Google Maps not shown / blank

后端 未结 4 1285
广开言路
广开言路 2021-01-27 23:44

I\'ve found different topic about this, but neither got me the maps working in my activity. I\'ve followed the guide provided by google about using maps from google play service

相关标签:
4条回答
  • 2021-01-27 23:51

    I've solved it. As all of you suggested it was the API key, in particular permissions related to that key.

    My problem was the package name, since I used an app with different module, the package name sent to the server was different than the one used to create the key automatically. So I've fixed the problem adding to permission another package name with the same SHA1 key.

    For all future readers, I want you to note that I had no error shown until I switched from SupportMapFragment to MapFragment, so I suggest to do so for debugging.

    Thanks to anyone helping, cheers.

    0 讨论(0)
  • 2021-01-27 23:53

    Add this line in the application tag of the manifest

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>
    

    also make sure that you correctly generate the api key. visit this link How to generate the api key

    0 讨论(0)
  • 2021-01-28 00:02

    When map is shown blank the reason use to be a problem with your API key. I would check that you generate the API Key correctly.

    0 讨论(0)
  • 2021-01-28 00:14

    When you cant see map and also no error that means it is a problem with API key. You need to get an API key from google to use Google Map perfectly. To get the API key you need to follow some steps and in one of those steps you need to use the SHA fingerprint key. However the link below shows you the steps.

    https://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key/

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