Google map Release API Key not working

旧巷老猫 提交于 2019-12-08 06:42:45

问题


Hi I am using google maps API, and I am having issues while creating a release APK. but Map is working fine in debug build. I created API key for release by following this link. First I got SHA1 key by typing in terminal keytool -list -v -keystore your_keystore_name -alias your_alias_name. Using this key I created An API key from Google Developer Console for android. Is there anything I am doing wrong. Please help me.


回答1:


I got the solution. I was adding API key at wrong location. I added release API key inside src/debug/res/values/google_maps_api.xml mistakenly. When I copied it to src/release/res/values/google_maps_api.xml it worked.



来源:https://stackoverflow.com/questions/38435243/google-map-release-api-key-not-working

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