Google Map not working in Released apk

情到浓时终转凉″ 提交于 2019-12-11 10:51:49

问题


I am creating an android app using Google Maps Api v2 targeted for Android Api 16+ compiled using Api 23.

I am having a strange problem. When I tested the app on my phone; installing through Studio's Run button, It work perfectly fine, but when I released an APK and installed the app from the APK on my phone, map does not work. Only a dark grey color loads in the map fragment. I am using the default template provided by the AndroidStudio to create the Map. Please, let me know if you require more details to answer my question.

Thanks in advance, Abhishek


回答1:


I solved the problem by moving the API key from separate resources file generated by Studio to Manifest file.

Thank you @Florence Herrou for your answer.



来源:https://stackoverflow.com/questions/33158256/google-map-not-working-in-released-apk

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