【问题标题】:Game crashes unity Google Play Services游戏崩溃统一 Google Play 服务
【发布时间】:2017-05-25 05:16:25
【问题描述】:

由于某种原因,我的游戏每次加载时都会在 android 上崩溃,它在统一编辑器中运行良好,但是在构建 apk 并发布到应用商店时崩溃

我知道问题是由 Google Play 服务引起的,因为如果我注释掉所有 google play 代码,游戏就可以运行

所以我在控制台中检查了我的崩溃日志,这就是我所看到的

backtrace:
  native: pc 0000000000039c24  /system/lib/libc.so (tgkill+12)
  native: pc 0000000000016af5  /system/lib/libc.so (pthread_kill+52)
  native: pc 0000000000017707  /system/lib/libc.so (raise+10)
  native: pc 0000000000013f75  /system/lib/libc.so (__libc_android_abort+36)
  native: pc 0000000000012a3c  /system/lib/libc.so (abort+4)
  native: pc 0000000000226033  /system/lib/libart.so (art::Runtime::Abort()+170)
  native: pc 00000000000a72e9  /system/lib/libart.so (art::LogMessage::~LogMessage()+1360)
  native: pc 00000000000b1401  /system/lib/libart.so (art::JniAbort(char const*, char const*)+1112)
  native: pc 00000000000b1945  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
  native: pc 00000000001bdc1d  /system/lib/libart.so (art::JNI::RegisterNativeMethods(_JNIEnv*, _jclass*, JNINativeMethod const*, int, bool)+1732)
  native: pc 00000000001bdda5  /system/lib/libart.so (art::JNI::RegisterNatives(_JNIEnv*, _jclass*, JNINativeMethod const*, int)+12)
  native: pc 000000000009221b  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so
  native: pc 0000000000092e37  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so
  native: pc 00000000000933dd  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so
  native: pc 000000000008dc69  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so (gpg::AndroidPlatformConfiguration::Valid() const+76)
  native: pc 0000000000053441  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so (gpg::GameServices::Builder::Create(gpg::AndroidPlatformConfiguration const&)+40)
  native: pc 00000000000c73dd  /data/app/com.FlameForged.idleTD-1/lib/arm/libgpg.so (GameServices_Builder_Create+16)
  native: pc 000000000000c104  <unknown>

老实说,我不知道这意味着什么,我也不完全确定如何解决这个问题

为了进一步解释,我有一个预加载器场景,它在游戏实际开始之前进行了一些重要的加载(到目前为止一切都很好),现在当我加载男人场景(调用我的加载函数)时,游戏立即崩溃

如果需要任何代码来帮助解决问题,我很乐意提供

【问题讨论】:

    标签: android unity3d google-play-games


    【解决方案1】:

    日志中在此之前的某处应该有一个更具描述性的异常消息。 可能是因为插件和 play-services*.aar 版本不匹配。如果您使用的是 0.9.36 或更早版本的插件,则需要使用 10.0.0 或更早版本的 play-services 库。

    理想情况下,您可以使用需要播放服务 10.2 或更高版本的插件的最新版本 (0.9.38a)。

    如果还是不行,可以多发些日志吗?

    【讨论】:

    • 实际上解决了它来自统一更新的问题,存在一个不兼容问题,显然迫使应用程序在版本类中使用 10.0.1,然后转到 assets->google play->resolve jars 修复了问题
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-05
    • 2013-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多