应用程序使用Google Play游戏服务立即崩溃

时间:2014-07-06 03:20:57

标签: android-logcat google-play-games

我将我的计算机双启动到Linux,然后我将所有项目文件复制到Linux中的Eclipse中,我收到了这些错误。

>07-04 23:23:17.980: W/PopupManager(6781): You have not specified a View to use as content >view for popups. Falling back to the Activity content view which may not work properly in >future versions of the API. Use setViewForPopups() to set your content view.
>07-04 23:23:17.990: W/art(6781): Failed to find ELF magic in >/system/framework/com.android.media.remotedisplay.odex: dey
>07-04 23:23:18.000: W/art(6781): Failed to find ELF magic in >/system/framework/com.android.location.provider.odex: dey
>07-04 23:23:18.000: W/art(6781): Failed to find ELF magic in >/system/framework/com.google.android.ble.odex: dey
>07-04 23:23:18.100: W/ResourceType(6781): Failure getting entry for 0x7f06000d (t=5 e=13) >in package 0 (error -75)
>07-04 23:23:18.100: E/GooglePlayServicesUtil(6781): The Google Play services resources were >not found. Check your project configuration to ensure that the resources are included.
>07-04 23:23:18.150: I/Adreno-EGL(6781): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM >Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
>07-04 23:23:18.170: D/OpenGLRenderer(6781): Enabling debug mode 0
>07-04 23:23:18.570: D/AndroidRuntime(6781): Shutting down VM
>07-04 23:23:18.570: E/AndroidRuntime(6781): FATAL EXCEPTION: main
v07-04 23:23:18.570: E/AndroidRuntime(6781): Process: com.cs407project.cardgameswithfriends, >PID: 6781
>07-04 23:23:18.570: E/AndroidRuntime(6781): java.lang.IllegalStateException: A fatal >developer error has occurred. Check the logs for further information.
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.google.android.gms.internal.eh$h.b(Unknown Source)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.google.android.gms.internal.eh$h.a(Unknown Source)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.google.android.gms.internal.eh$b.ec(Unknown Source)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.google.android.gms.internal.eh$a.handleMessage(Unknown Source)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >android.os.Handler.dispatchMessage(Handler.java:102)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at android.os.Looper.loop(Looper.java:136)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >android.app.ActivityThread.main(ActivityThread.java:5001)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at java.lang.reflect.Method.invoke(Native >Method)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
>07-04 23:23:18.570: E/AndroidRuntime(6781):    at >com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
>07-04 23:27:40.990: I/Process(6781): Sending signal. PID: 6781 SIG: 9

在调用onCreate()之前发生此错误。我将BaseGameUtils和google-play-service_lib作为库导入,它们都在我的主程序的构建路径中。 google-play-services_lib是从SDK复制的,因此没有从那里引用。

如果有人可以提供有关如何/在logcat中阅读的内容的建议,我将不胜感激。我总是觉得我在顶部或底部读取randoms位并尝试直到它起作用。

1 个答案:

答案 0 :(得分:0)

此错误可能是因为未在AndroidManifest中设置com.google.android.gms.games.APP_ID。请参阅this的第3步。

尝试将此添加到AndroidManifest.xml中,位于应用程序元素中:

<meta-data android:name="com.google.android.gms.games.APP_ID"
   android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
   android:value="@integer/google_play_services_version"/>

@ string / app_id指的是Google Play开发者控制台中您应用的游戏服务ID。 This实施成就教程将指导您完成整个过程。