谷歌地图不起作用在发布的apk [英] Google Map not working in Released apk
问题描述
我正在创建一个使用Google Maps API v2的Android应用程序,该应用程序针对的是使用Api 23编译的Android Api 16+。
我有一个奇怪的问题。当我在手机上测试应用程序时;通过Studio的运行按钮进行安装,它工作得很好,但是当我发布APK并在手机上从APK安装应用程序时,地图不起作用。只有深灰色加载在地图片段中。我正在使用AndroidStudio提供的默认模板来创建地图。请告诉我,如果你需要更多的细节来回答我的问题。
在此先感谢,
Abhishek
谢谢!你 @Florence Herrou 为你的答案。
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
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.
这篇关于谷歌地图不起作用在发布的apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!