简体   繁体   中英

Google Map not working in Release APK, but working correct in Debug APK

I've implemented Google Map in my application. Everything works correct in Debug version. But as soon I generate Release APK, Google Map is not working

I have done All process for (SHA-1 key and package), but I'm facing the same problem.

I have seen the "questions that may already have your answer", but I'm not satisfied with those answers.

Debug certificate is different from your production certificate. You need to add both to your Google Maps key entry in your API console as seaparate row - each with the same packageId, but naturally different SHA1 hash.

OR

Maybe you have two google_maps_api.xml files, one in the app/src/debug/res/values folder and the other in the app/src/release/res/values folder, but only the debug one contains your API key.

您可以按照以下步骤在调试和发布模式下使用Google Maps https://stackoverflow.com/a/17141660/8118033

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM