Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PLACES_API_INVALID_APP error from Android Play Places

I am trying Google Place Autocomplete Example from https://github.com/googlesamples/android-play-places.

I have put the correct API key at the correct place. I knew it because when I put a random string invalid API key I will get a different error.

So after I put the correct API key, I run the app in both real device and simulator. Both devices gave me this error:

Status{statusCode=PLACES_API_INVALID_APP, resolution=null}

What causes this error and how to fix it?

like image 641
Aldian Fazrihady Avatar asked Oct 14 '15 01:10

Aldian Fazrihady


1 Answers

It's because the package that you put on the credentials section on the Developers Console is different to the project you are building.

  1. Open https://console.developers.google.com
  2. Go to APIs & auth menu on the left side, and go to Credentials
  3. You can add new Android API and put the package you are building, or edit any existing and add another package name and fingerprint (SHA1).
like image 116
denilukman Avatar answered Sep 22 '22 03:09

denilukman