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?