Google-map work on emulator but doesn't on real device

后端 未结 4 1392
感动是毒
感动是毒 2021-01-29 11:09

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 pro

相关标签:
4条回答
  • 2021-01-29 11:27

    Did you installed Google Setting App on your mobile.

    Check this

    0 讨论(0)
  • 2021-01-29 11:40

    It's important to remember that Build Releases debug and release mode often have different (.xml) values file. if you are using a Linked Resource File (eg: Google_maps_api.xml) to manage your Maps Api Key, you need to update both files with their appropriate keys.

    Keys must be signed using the same procedure as described above ( using your .jks keystore file ..etc )

    0 讨论(0)
  • 2021-01-29 11:43

    You will get .keystore or .jks file while generating signed APK.In fact using that you have to create the finger print for your application which is later used to generate Android Key in Google developer console.

    Now what you have to do is use the command to generate the SHA-1 certificate fingerprint

     keytool -list -v -keystore "path_to_jks_file.jks" -alias androiddebugkey -storepass android -keypass android
    

    In that path_to_jks_file.jks you should give the path of your .jks file that you got when generating signed APK.

    And get your android key from google developer console then add it in manifest

    And remember to add the signing configuration to your build.gradle

    signingConfigs {
            release {
                storeFile file("myreleasekey.jks")
                storePassword "password"
                keyAlias "MyReleaseKey"
                keyPassword "password"
            }
        }
    

    Signing your application

    Visit for clarification.

    An elaborated explanations Signup and API Keys

    AFAIK these information's good enough for resolving your issue.tell me if any further.

    0 讨论(0)
  • 2021-01-29 11:50

    It is working on emulator on debug mode because you are using the Google Map Api key which is register with your debug.keystore file. To access Google Map into the real device you have to generate the Google Map key using the keystore file which you are using to generate the apk file.

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