Error PLACES_API_INVALID_APP with Android Play Places

I am trying to use the Google Place autocomplete example from https://github.com/googlesamples/android-play-places .

I put the correct API key in the right place. I knew this because when I put a random string, an invalid API key, I get another error.

So, after entering the correct API key, I run the application on both the real device and the simulator. Both devices gave me this error:

Status {statusCode = PLACES_API_INVALID_APP, permission = null}

What causes this error and how to fix it?

+8
android google-places-api
source share
6 answers

This is because the package that you put in the credentials section of the Developer Console is different from the project you are building.

  • Open https://console.developers.google.com
  • Go to the APIs and auth menu on the left side and go to Credentials
  • You can add a new Android API and place the package you created or change the existing one and add another package name and fingerprint (SHA1).
+8
source share

Follow my steps:

1> Create new projects on the Google Developer Console

2> API Manager> Credentials> New Credentials> API Key> Android Key> Click "Create" and create an API key

Here, creating a key without using an application package and SHA fingerprint works in any application

MUST REMEMBER:

Enable the Google Places API for Android

+2
source share

In my case, SHA-1 certificate fingerprint used only for debug , I also added release SHA-1. Now it works.

Make sure you use the exact package_name and a valid SHA-1 key for debugging as well as for the release of the application

+1
source share

I was getting "PLACES_API_INVALID_APP" even after publishing my SHA1 release. Having tried everything I found out, my release application is not even signed with SHA1, which I received from the keystore. So I did this:

1.Go to Google Play Console

2. Shipment Management> Subscription Signing> Application Signing Certificate

3.Copy SHA1 application signature certificate and paste google api console account page

Now you are good to go! Unfortunately, it is not documented anywhere.

+1
source share

Status {statusCode = PLACES_API_INVALID_APP, permission = null}

this means your api key is invalid, so create an API key with the package name and SHA fingerprint

STEPS fot Create API Key

1. Get information about your application certificate (SHA fingerprient).

2. Register the project in the Google Developers Console

3. Add the Google Places API as a service for the project and create an API key.

4. Add the key to the application manifest.

0
source share

Although I turned on the Android Place API from the developer console, I ran into this error:

Status {statusCode = PLACES_API_INVALID_APP, permission = null}

Then I go to the developer console and select my project, registered earlier, and follow the β€œGet API API” option for my project. I decided it like that.

0
source share

All Articles