【问题标题】:java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further informationjava.lang.IllegalStateException:发生了致命的开发人员错误。检查日志以获取更多信息
【发布时间】: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


【解决方案1】:

确保在运行时使用正确的配置。这里的示例:

https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples

当你打开包时,有一堆项目都打开了。确保您设置了正确的配置,否则您会遇到错误,因为其他项目没有设置正确的 App Id 值。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-25
    • 2014-07-12
    • 1970-01-01
    • 2021-04-26
    • 1970-01-01
    • 2019-08-11
    • 2014-07-07
    • 2017-06-30
    相关资源
    最近更新 更多