我以前遇到过这个问题,谷歌 map 显示灰屏,没有显示 map 。
我通过在测试环境上安装 google 服务解决了这个问题,它工作正常。
现在的问题是已发布的应用程序对从 Google Play 安装该应用程序的人显示相同的灰色屏幕(无 map )。
我不能要求人们去下载 Google 服务,以便他们让我的应用程序运行。
无论如何,我是否可以将这些服务嵌入到我的应用程序中或以任何其他方式来解决此问题。
谢谢
我在 google_maps_api.xml 中有这个
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">
AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</string>
我在 list 中也有这个
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="@string/google_maps_key" />
最佳答案
请添加权限:
<permission
android:name="com.pkg.map.permission.MAPS_RECEIVE"
android:protectionLevel="signature" >
</permission>
这里 com.pkg.map 是 map Activity 所在的包名。