Google map not loading on normal devices but loads on test device(real device)

前端 未结 3 580
失恋的感觉
失恋的感觉 2021-01-07 12:24

I have a google map in my android application, i have got the api key in my app from Google api console and it sucessfully loads the map in my test device and to those devic

3条回答
  •  北海茫月
    2021-01-07 12:54

    The problem is that you have not added the SHA1 key of your signed apk in your google api console.

    Do this-

    While creating your signed apk for production copy the new SHA1 key of the signed build.

    During the process of signing, output similar to that outlined below will appear within the Console panel:

    [2013-06-13 10:34:39 - ReleaseTest] New keystore C:\Users\nas\Documents\AndroidReleaseAPK\ReleaseTest.apk has been created.
    [2013-06-13 10:34:39 - ReleaseTest] Certificate fingerprints:
    [2013-06-13 10:34:39 - ReleaseTest]   MD5 : FA:65:D--------------
    [2013-06-13 10:34:39 - ReleaseTest]   SHA1: D1:E-------------------
    

    or it will also appear on the popup where you will name your build finally before signing it. enter image description here

    Use this SHA1 to create new key at api console and include that in your app. The map will load successfully.

    Edit:-After you have followed the above procedure, do not right click and run the project again from eclipse, that will make the app to load from its default sha1 key. After you sign the app, manually copy paste the signed .apk to your device. That will make it work.

提交回复
热议问题