java - 发布到应用商店后 Pin 图未显示

标签 java android google-maps google-maps-android-api-2

在测试和调试时,我使用了我的调试 API key ,现在我已经转移到我的发布 API key 并发布了应用。

显示 map 加载和 GPS 位置(表明 API key 正确),但未显示图钉(注释)。我也遇到了以下错误:

08-12 15:50:42.315: E/GooglePlayServicesUtil(11478): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

我已经检查过,我有这个:

enter image description here

所以我认为一切都会好起来的。

同样出现这个错误:

08-12 15:50:42.315: E/GooglePlayServicesUtil(11478): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
08-12 15:50:42.325: E/log_tag(11478): Error in http connection android.os.NetworkOnMainThreadException
08-12 15:50:42.325: E/log_tag(11478): Error converting result java.lang.NullPointerException: lock == null
08-12 15:50:42.325: E/log_tag(11478): Error parsing data org.json.JSONException: End of input at character 0 of 

我已尝试生成新 key 并跟踪下载的 JSON,一切似乎都很好。

最佳答案

您正在尝试在主线程上访问网络。不要那样做,它会阻塞你的线程。

参见:How to fix android.os.NetworkOnMainThreadException?

关于java - 发布到应用商店后 Pin 图未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18190328/

相关文章:

java - Android studio 不自动导入java头

java - 谷歌地图, map 正在加载,但未完全加载

java - 谷歌地图 fragment 显示更多文字

java - 集合中的 Hibernate 集合

java - 如何在Java中使用AES算法解密加密的字符串?

android - 从 Android 应用程序直播到 Youtube

javascript - ng-click 错误 : [$parse:syntax] Syntax Error: Token 'Object' is unexpected, 期待 []]

java - 静态方法和实例方法的同步

java - Java中的正则表达式黑暗角落...字符顺序改变了正则表达式的含义?

android - 如何在 Android 中使用 Firebase?