Google Places API "PLACES_API_QUOTA_FAILED"

Ok, so I'm new to google maps / geo etc. So, I went to the Google console, added the application, turned on the "Places API for Android" , copied the API key, like this:

<meta-data android:name="com.google.android.geo.API_KEY" android:value="API-KEY" /> 

I have activity where I was doing

mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this, 0 /* clientId */, this) .addApi(Places.GEO_DATA_API) .build();

Copy the adapter insert from the sample code. Everything compiled perfectly, autocompletetextview was configured correctly and that’s it.

Now, when I started typing, it immediately throws an error Error getting autocomplete prediction API call: Status{statusCode=PLACES_API_QUOTA_FAILED, resolution=null}

I searched and searched and guessed that google doesn't even have this error code in their documentation! Has anyone come across this? Did I miss something?

PS - I added the application a day ago, so definitely my quota is not over yet. There is also another error code for the exhausted quota.

+2
source share
6 answers

Sorry for this confusing error code - we are working to fix this.

This may be due to an incorrect certificate fingerprint in the configuration of the Developer Console. Could you double check the instructions at https://developers.google.com/places/android/signup#find-cert ?

Let me know if this works.

+4
source

So, the problem is that I created an “Android key” (which I thought was logical, because I was developing an application for Android). This did not work and gave me this confusing code. Then I came back, deleted this key and generated a "Server Key" and pasted this code into the application manifest. Guess what worked!

The most peculiar behavior, and this step is not even mentioned in the documentation as to why this is logical.

+2
source

I had the same problem. For me, the problem was fixed by enabling api through:

https://console.developers.google.com/flows/enableapi?apiid=placesandroid&keyType=CLIENT_SIDE_ANDROID&reusekey=true

and update the key as server one

+1
source

In my case, an error was generated because the new sdk and android studio were installed. So, right after the steps in the Google tutorial, the problem was solved: https://developers.google.com/places/android/signup#find-cert

0
source

I changed the name of my package at the development stage. After changing the package name in the api apps for Console developers, I ran into this error. The solution was to just wait 5 minutes after changing the key in the developer console. The developer console clearly states this, but is easy to ignore.

0
source

This happened to me when using genymotion . This also happens on devices and emulators. With me, I choose Run option from `android studio. What does not create a signed APK . Google Map service needs a signed apk to run.

Create a signed APK and drag it into genymotion (install it with adb install ) to make it work.

0
source

All Articles