FlamingGenius
FlamingGenius

Reputation: 216

Game crashes unity Google Play Services

For some reason my game crashes on android everytime its loaded it works fine in the unity editor but when building apk and releasing to app store it crashes

I know for a fact that the issue is due to Google Play Services because if i comment out all the google play code the game works

So I checked my crash logs in the console and this is what I see

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>

I honestly have no idea what this means and im not entirely sure what to do to fix the issue

To explain further I have a preloader scene that does some important loading before the game actually starts(everything is googd to this point) now when I load up the men scene(where my load function is called) the game immediatly crashes

If any code is needed to help fix the issue I am happy to provide

Upvotes: 1

Views: 1069

Answers (1)

Clayton Wilkinson
Clayton Wilkinson

Reputation: 4572

There should be a more descriptive exception message somewhere before this in the log. It might be because you have a mismatch between the plugin and the play-services*.aar versions. If you are using 0.9.36 or earlier of the plugin, you need to use 10.0.0 or earlier of play-services libraries.

Ideally, you can use the latest version of the plugin (0.9.38a) which requires play-services 10.2 or later.

If it still does not work, can you post more of the log?

Upvotes: 2

Related Questions