Play-games-plugin-for-unity: Crashes when using Gradle build system (Unity 2018.3.0)

Created on 1 Jan 2019  路  11Comments  路  Source: playgameservices/play-games-plugin-for-unity

When I build my apk with Gradle build system (Build Settings > Build System as "Gradle") the whole build process goes just ok but get some errors on runtime.

E   6736        GamesNativeSDK  Exception in dalvik/system/DexClassLoader.loadClass: java.lang.IncompatibleClassChangeError: Class com.google.android.gms.games.NativeSdkCallbacks implements non-interface class com.google.android.gms.nearby.connection.Connections$ConnectionRequestListener (declaration of 'com.google.android.gms.games.NativeSdkCallbacks' appears in /data/data/( ... my bundle name ... )/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.jar).
F   6736        zygote  java_vm_ext.cc:504] JNI DETECTED ERROR IN APPLICATION: java_class == null
F   6736        zygote  java_vm_ext.cc:504]     in call to RegisterNatives
F   6736        zygote  java_vm_ext.cc:504]     from java.lang.Object com.unity3d.player.ReflectionHelper.nativeProxyInvoke(int, java.lang.String, java.lang.Object[])

I don't get this error when using Internal (deprecated) build system.

bug

Most helpful comment

Hey @olehkuznetsov , It turns out that I had the old libgpg.so in a non standard path, and so the resolver didn't remove it. Looking at GPGSUpgrader.cs, it looks like the expected path is "Assets/Plugins/Android/libs/armeabi/libgpg.so", whereas my lib was located at "Assets/Plugins/Android/libs/armeabi-v7a/libgpg.so". Deleting this file fixed my issue.

It would be great if the list of obsolete files could be added to the upgrade notes so that we can verify it ourselves, rather than have it hardcoded into the resolver. :)

All 11 comments

Which plugin version do you use?

Which plugin version do you use?

I'm using 0.9.57 now.

Happening to me too, building with Unity 2017.3.1f1 using Gradle and plugin version 0.9.58

Dependencies are up to date too (I think):

screen shot 2019-01-20 at 21 39 13

I'm having the same issue with Unity 5.6 with Gradle and plugin version 0.9.58.

It would help a lot if you try it on a new project without Firebase first. May be it is some incompatibility with a new firebase plugin.

Thanks, but unfortunately I don't have Firebase on my project.

Can you show your current dependencies list as in reply above, please?

Can you also check if Proguard is enabled in build settings, please?
Player Settings->Publishing Settings->Minify

Hey @olehkuznetsov , It turns out that I had the old libgpg.so in a non standard path, and so the resolver didn't remove it. Looking at GPGSUpgrader.cs, it looks like the expected path is "Assets/Plugins/Android/libs/armeabi/libgpg.so", whereas my lib was located at "Assets/Plugins/Android/libs/armeabi-v7a/libgpg.so". Deleting this file fixed my issue.

It would be great if the list of obsolete files could be added to the upgrade notes so that we can verify it ourselves, rather than have it hardcoded into the resolver. :)

Thank you for the update. Will check how to fix GPGSUpgrader.cs

Should be fixed already in v0.10.06. Feel free to reopen if it reproduces with latest plugin version.

Was this page helpful?
0 / 5 - 0 ratings