【问题标题】:Pins are not showing up after publishing to app store发布到应用商店后 Pin 图未显示
【发布时间】:2013-08-13 23:04:41
【问题描述】:

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

显示地图加载和 GPS 位置(表明 API 密钥正确),但未显示图钉(注释)。我也收到以下错误:

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.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 

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

【问题讨论】:

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


    【解决方案1】:

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

    见:How to fix android.os.NetworkOnMainThreadException?

    【讨论】:

    • 感谢您的评论,我不是故意这样做的 - 我怎样才能阻止这种情况发生?我实际上并没有说它使用主线程。
    • 如果你阅读了我发给你的链接,那里有各种各样的选择。主要是你想把你的网络交互放在一个新线程上。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-25
    • 1970-01-01
    相关资源
    最近更新 更多