Android Place Picker closes immediately after launch
Francois Wouts' solutions helped answer this. Thank you Francois...
I searched the logs with keyword 'Places' and found that Places API was indeed throwing an exception. It expected the com.google.android.geo.API_KEY
within the <application>
tags in the Manifest.xml.
I had changed to com.google.android.geo.API_KEY
in the <activity>
tag and not the one in the <application>
tag.
Now changed to com.google.android.geo.API_KEY
and removed the same lines from <activity>
tag, and got it working. Feel like an idiot for not working this out by myself..
The meta-data tag should read
android:name="com.google.android.geo.API_KEY"
It should be within the<application>
tag in the Manifest.
I was having the same issue. Make sure you enable Google Places API for Android and not just Places API in the Developer Console. "Places API for Android" will not show up under APIs & Auth/APIs because it isn’t a popular API (yet). You will have to search for it using the API search box.
Have you double checked that your API key is associated with your application (package name and SHA-1 fingerprint of your app's certificate) in the Developer Console?
You can find instructions at Signup and API Keys. Make sure to set it up for both your debug and your release certificates.
I hope that helps!