Google Places API for Android Place Picker Does not work

后端 未结 3 1389
醉梦人生
醉梦人生 2020-12-11 16:09

I am unable to use the Place picker in my app. The API worked then just stopped one day with no explanation.The picker shows up for a very short period of time then simply c

相关标签:
3条回答
  • 2020-12-11 16:33

    instead of this:

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="your_key"/>
    

    add this:

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

    It worked for me!!!

    0 讨论(0)
  • 2020-12-11 16:38

    I figured out the answer to my own question.

    If anybody else encounters the same issue, make sure you enable "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 isnt a popular API (yet). You will have to search for it using the API search box.

    0 讨论(0)
  • 2020-12-11 16:43

    Check your build variant.

    If you switched back from release to debug, you typically also get result code 2.

    Switching back to release did the trick for me.

    0 讨论(0)
提交回复
热议问题