Place Picker Automatically close after launch

前端 未结 6 1667
半阙折子戏
半阙折子戏 2020-12-10 03:57

I want to show place picker so that user can choose location of his/her own choice. But place picker child activity automatically closes after launch. I\'ve check the API ke

相关标签:
6条回答
  • 2020-12-10 04:27

    Please check the logcat of your app for 'PLACES_API_ACCESS_NOT_CONFIGURED' message. If this is the case, enabling the Google Places API for Android in your Google Developer Console for this project should solve your problem.

    0 讨论(0)
  • 2020-12-10 04:27

    Enable both places API as well as Places sdk

    0 讨论(0)
  • 2020-12-10 04:30

    After A lot of debugging i solved it myself. The problem was package name..Android studio manage package name by itself on project creation. I change the package name in manifest and it was working perfectly fine. but when i get API key from google developers console for place picker, place picker automatically closes without a single character of error.

    Then I change the package name by going into -> Module Settings -> Flavors and change the Application ID and it fix the problem.

    0 讨论(0)
  • 2020-12-10 04:37

    Instead of enabling the places API, Enable the places SDK for android. Worked for me. Good Luck :)

    0 讨论(0)
  • 2020-12-10 04:39

    Make sure that Google Places API is enabled for the API key that you are using in Google API console. For me, I am using the same API key that I use for maps. I just enabled the same key for places api also. That solved my problem. Use this link to access the Google console: https://console.developers.google.com/flows/enableapi?apiid=placesandroid&reusekey=true

    0 讨论(0)
  • 2020-12-10 04:40

    Solved problem by just changing the API key

    You can create a new key from here

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