Release APK file not showing google maps

前端 未结 8 2119
暗喜
暗喜 2020-12-05 07:05

I applied the exact steps as mentioned in the google developer doc to create an example google map project and everything went fine on the emulator, but when I generated the

8条回答
  •  旧巷少年郎
    2020-12-05 07:51

    Reason for this issue

    This occurred because there are different SHA1s in debug and release types.

    Fix for this issue

    Add the SHA1 of the keystore used to build the release APK to Google console

    Steps:

    1. Get the path of the keystore when you generate signed APK

      Build ----> Generate Signed APK..

    Save the key store path

    Remember to make Build Type --- release

    1. Extract SHA1 from the keystore.

    Open your terminal use command below:

     keytool -list -v -keystore "/Users/NT/Desktop/generalkey.jks"
    

    You will be asked for password for your keystore.

    Change path to your keystore path keytool -list -v -keystore "keystore path"

    From the Certificate fingerprints, you will see the SHA1

    1. Generate android key using this SHA1 and your package name

    Generate APK using keystore and enjoy your map

提交回复
热议问题