Android Place Picker closes immediately after launch

后端 未结 14 1356
难免孤独
难免孤独 2020-11-27 04:57

I am developing an android application as part of a project, and am using Google places API to display places of interest based on location. I am using the PlacePicker Inent

14条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 05:39

    In my case there was conflict of APIs. I have added google-service.json file which also had API key and I generated new key for Maps. So place picker was closing immediately. Solution :

    1. Use single API key which is in google-service.json file

    2. Enable "Places SDK for Android" feature for your Google Cloud Platform project (with same name as in Firebase project , don't use different project. You will find same name project as you are using in Firebase)

    3. Put SHA1 Application Restriction for android app (Recommended)
    4. Check if you have placed following code in Application tag only

          
      

提交回复
热议问题