Google maps v2 doesn't showing after publishin

2019-01-19 23:20发布

问题:

i have some problem, my app works fine, but when i load it in Play market, maps does not works correctly. I make next:

  1. Get SHA1 keytool -list -v -keystore C:\User\Name/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
  2. In Google console i create API KEY. SHA1;com.kostya.app
  3. Rigth click on project - Android tools - Export signed application packuage
  4. Create new keystore and new *.apk file.
  5. Load it into market.

Where is my mistake? I read this article. Together we can create nice tutorial how to sign app using google maps v2. How to test application at once after loading in play market, without weithing some ours.

回答1:

When your are creating keystore for creating signed apk you have to do this.

  1. change debug.keystore to your created keystore
  2. change alias name to your project name
  3. set the password the same like in your created keystore (not android as in debug mode)

    keytool -list -v -keystore ~/.android/ YOUR_KEYSTORE -alias YOUR_PROJECT_NAME

more help find here



回答2:

You have to create a production keystore, you should not use the debug.keystore.

Check out the documentation.



回答3:

Just generate SHA1 using

keytool -list -v -keystore mystore.keystore

go and add the package name and SHA1 fingerprint to the already generated



回答4:

I used Android studio to generate the release keystore. After tried many ways for two days I finally got this to work. The problem is that when generating signed APK in Android Studio either by choosing the existing keystore or creating a new one, the default format for the keystore file is ".jks". That is the problem. After I changed that to ".keystore" and generated the release apk, and then copied the SHA1 into google console. The map can finally be showing.



回答5:

Just Add the apikey to debug>res>values>google_maps_api.xml

add in release>res>values>google_maps_api.xml files.



回答6:

after publishing the app on play store. on Google Play Console Goto: Release Management >App Signing from "App signing certificate" copy SHA1 and paste it on Google cloud platform API console.