Android crash on GooglePlayServices (Games) connect

前端 未结 2 1842
长情又很酷
长情又很酷 2021-01-15 02:13

I\'m messing around with this problem about 10h and i cann\'t figure out what i\'ve done wrong....

The Fatal Exception:

E/AndroidRuntime         


        
相关标签:
2条回答
  • 2021-01-15 02:48

    Looked around the community for similar posts and found this answer, check it out. Gonna go straight to the point, I think the cause of this issue is in your AndroidManifest.xml. As mentioned in the answer, the <meta-data> tag should be added, yours is there, but the name is different. It shows as:

    android:name="com.google.android.gms.games.onl.deepspace.zoorallye"

    while in the answer above, it shows:

    android:name="com.google.android.gms.games.APP_ID"

    Went to the Google Quickstart samples and notice that all of the tags are like the above. Haven't seen anything else in your code that's causing the issue. Hope this helps. Good luck.

    0 讨论(0)
  • 2021-01-15 03:02

    I believe this might be related to missing the com.google.android.gms.games.APP_ID metadata element in your AndroidManifest.xml

    It looks like a typo (you replaced APP_ID with your package name?). It should be: <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />

    You can refer to TypeANumber basic sample's AndroidManifest.xml https://github.com/playgameservices/android-basic-samples/blob/master/BasicSamples/TypeANumber/src/main/AndroidManifest.xml#L41

    0 讨论(0)
提交回复
热议问题