我正在尝试新的Google Play游戏服务。首先,我遵循了此方法https://developers.google.com/games/services/android/quickstart ,然后完成了此https://developers.google.com/games/services/android/init我最终像这样:05-16 20:01:39.034: E/AndroidRuntime(18257): FATAL EXCEPTION: main05-16 20:01:39.034: E/AndroidRuntime(18257): java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.05-16 20:01:39.034: E/AndroidRuntime(18257): at com.google.android.gms.internal.p$f.a(Unknown Source)05-16 20:01:39.034: E/AndroidRuntime(18257): at com.google.android.gms.internal.p$f.a(Unknown Source)05-16 20:01:39.034: E/AndroidRuntime(18257): at com.google.android.gms.internal.p$b.p(Unknown Source)05-16 20:01:39.034: E/AndroidRuntime(18257): at com.google.android.gms.internal.p$a.handleMessage(Unknown Source)05-16 20:01:39.034: E/AndroidRuntime(18257): at android.os.Handler.dispatchMessage(Handler.java:99)05-16 20:01:39.034: E/AndroidRuntime(18257): at android.os.Looper.loop(Looper.java:137)05-16 20:01:39.034: E/AndroidRuntime(18257): at android.app.ActivityThread.main(ActivityThread.java:5041)05-16 20:01:39.034: E/AndroidRuntime(18257): at java.lang.reflect.Method.invokeNative(Native Method)05-16 20:01:39.034: E/AndroidRuntime(18257): at java.lang.reflect.Method.invoke(Method.java:511)05-16 20:01:39.034: E/AndroidRuntime(18257): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)05-16 20:01:39.034: E/AndroidRuntime(18257): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)05-16 20:01:39.034: E/AndroidRuntime(18257): at dalvik.system.NativeStart.main(Native Method)我试图逐步按照本教程进行操作。我不明白怎么了。ava.lang.IllegalStateException:发生致命的开发人员错误。检查日志以获取更多信息。我以为logcat =日志,仅此而已。那么我在哪里可以找到这些“日志”?我的实现仅在一件事上有所不同。我有一个扩展BaseGameActivity的ClassA,然后是扩展了ClassA并实现View.OnClickListener的ClassB,所以我在ClassB类中拥有https://developers.google.com/games/services/android/init中的所有方法谢谢你的帮助
3 回答
料青山看我应如是
TA贡献1772条经验 获得超8个赞
最初我有同样的问题。我要做的是查看完整的,未经过滤的LogCat日志。在那里,我看到了以下消息:
GamesIntentService(17929):要使用Google Play游戏服务,需要在清单的应用程序标签中使用名称为“ com.google.android.gms.games.APP_ID”的元数据标签
因此,假设您在strings.xml被称为中创建了一个条目,请app_id尝试AndroidManifest.xml在<application>标记下添加以下内容:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
您可以在“ 游戏服务”标签中找到自己的APP_ID
智慧大石
TA贡献1946条经验 获得超3个赞
只是有同样的问题,但是元标记正确-我确实查找了未过滤的logcat,发现它正在搜索其他元标记。
元标记的名称因您在GameHelper构造函数(如果使用)中提交的客户编号的种类而异。
new GameHelper(this, GameHelper.CLIENT_GAMES);
对我来说,我偶然使用了CLIENT_ALL,这导致对元标记名称的期望值错误。我将其更改为CLIENT_GAMES,一切正常。
- 3 回答
- 0 关注
- 511 浏览
添加回答
举报
0/150
提交
取消