Android SHA1 release keystore not working with Google Maps

[亡魂溺海] 提交于 2019-11-27 07:26:09
suhaig

You have two google_maps_api.xml files

One in this folder:

app/src/debug/res/values

Other in this folder:

app/src/release/res/values

But only the debug one contains your API key probably.

Joel

1) Usually, you have to Clean and Rebuild the Project so it can work.

2) Make sure your build variant is on Release (Android Studio is friendly on this)

3) Also if you are debugging on your devices fully uninstall first then continue.

4) As the documentation says, make sure you have set up your manifest correctly.

Hope it helps.

the SHA1 currently you are using for debugging purpose .

So when you are creating a signed apk u have one kestore file. try to generate new SHA1 key with this new keaystore file.

then using this keystore file create API key for signed apk from google console.

replace debug API key already stored in manifest file with the new one.

It will work

thanks

Create new project in Android Studio with Google map Activity. After project automatically creates the SHA1 in the manifest. Use this SHA1 to get MAP api key. Test your app be sure it works. And after build you app on what project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!