【发布时间】:2017-09-07 10:56:23
【问题描述】:
我正在使用本教程设置 Google Play 回合制多人游戏:https://developers.google.com/games/services/console/enabling
我已经完成了本教程并且我认为我做的一切都是正确的,但是我不断收到错误 java.lang.IllegalStateException: A fatal developer error has occurred。查看日志以获取更多信息。
当我检查没有过滤器的 logcat 时(我假设这就是“日志”的含义),我看到的唯一相关错误是“应用程序 ID (ReplaceMe) 必须是一个数值。请验证您的清单是否引用正确的项目 ID。”
我的项目中存在应用程序 ID 的所有位置都已替换为我在开发者控制台中创建的 12 位应用程序,当我在项目中搜索“ReplaceMe”时,没有任何显示。
这两天我一直在拉头发。知道我应该怎么做吗?
下面是我的清单和 values/ids.xml
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mymikemiller.skeleton">
<application
android:allowBackup="true"
android:fullBackupContent="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@style/Theme.App" >
<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" />
<activity
android:name="com.mymikemiller.skeleton.SkeletonActivity"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
值/ids.xml:
<resources>
<!-- Insert your app id from the Developer Consoles -->
<string name="app_id"><My 12 digit app id></string>
</resources>
【问题讨论】:
标签: android google-play-services google-play-games