1) Created new project.
2) Selected google map created.
3) Debug google_maps_api.xml steps followed.
https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=:::::::::::::::::::%3Bcom.agtapp.srilanka
created google developer console API key.
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
AIzaSyDRuMUTElAoXoK2y2rXSqtpvdQSZ12z_dk
</string>
4) Release google_maps_api.xml steps followed.
developers.google.com/maps/documentation/android/signup steps.
keytool -list -keystore your_keystore_name
keytool -list -v -keystore your_keystore_name -alias your_alias_name
SHA1: :0D::74:D3::E1:43::71::62:90::A1:66:6E:__:5D:75 added
created google developer console API key.
<string name="google_maps_key" templateMergeStrategy="preserve"
translatable="false">
AIzaSyB3d_usre_Joj_TrgP3aKtdkrSt_tTeqGI
</string>
added different release key.
5) AndroidManifest.xml
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
6) Generate signed APK created, Build Type release version created.
7) Beta version published on play store.
8) Google map screen blank.
9) But local running app google map working fine.
10) All package name correctly added on google developer console.
I am assuming that this may due to mismatch SHA 1 Fingerprint. Double check that you are using the same keystore for getting SHA1 and apk release.
or Let's check your API key is valid or not. For that add following MAP_API as your release key
AIzaSyDztCvpv3PVBxzWwY7mWqCMnGfDeOiGxwY
Add following permission in your AndroidManifest.xml (Optional/not necessary)
<permission
android:name="your_pakage_name.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
Build your release apk. And test it.
If the map is showing then we can fix that your API key is the problem.
So get Sha1 one more time and update in your google developer console.
You are generating SHA-1 in cmd. sometimes cmd returns local SHA-1 not Administrator. So try to create SHA-1 from Android studio. follow steps to generate SHA-1:
Gradle
(right panel of the studio where Preview
option shows)Project name
Task
android
signingReport
your SHA-1 is generated copy this SHA-1 and paste in google console.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With