Play-games-plugin-for-unity: GPGS crash when app open

Created on 16 Feb 2017  路  90Comments  路  Source: playgameservices/play-games-plugin-for-unity

App crash when log this message.

02-16 17:17:49.669: I/Unity(5266): Building GPG services, implicitly attempts silent auth

this is after error messages

02-16 15:48:19.730: E/GamesNativeSDK(8454): 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/user/0/'appPackageName'/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.jar).

what is problem??

Most helpful comment

Here is how I worked around this issue:

  1. Go to Assets > Play Services Resolver > Android Resolver > Settings
  2. Un-tick Enable Background resolution (This will suppress the update notifications once we downgrade the .aar files)
  3. Go to \extras\google\m2repository\com\google\android\gms
  4. Inside each of the folders there are version folders (such as 10.0.1, 10.2.0). And inside those are the .aar files we need.
  5. We will need the following files:
  • play-services-ads-10.0.1.aar
  • play-services-ads-lite-10.0.1.aar
  • play-services-auth-10.0.1.aar
  • play-services-auth-base-10.0.1.aar
  • play-services-base-10.0.1.aar
  • play-services-basement-10.0.1.aar
  • play-services-clearcut-10.0.1.aar
  • play-services-drive-10.0.1.aar
  • play-services-games-10.0.1.aar
  • play-services-gass-10.0.1.aar
  • play-services-nearby-10.0.1.aar
  • play-services-tasks-10.0.1.aar
  1. Under \Assets\Plugins\Android delete the 10.2.0 versions of the .aar files above, with their META files.
  2. Copy the 10.0.1 versions over
  3. Build and run your project.

If you don't do Step 2, Play Services Resolver will keep asking you to update these .aar files.

I hope I was able to help anyone encountering this issue.

Edit: Removed the image of the list of files and wrote them down instead. For easier copy-paste and indexing.

All 90 comments

my unity version is 5.5.0f3 and all android sdk version is latest version

I updated Google Play Services client jars from 10.0.1 to 10.2.0. Now experiencing crash during GPGS initialization. Unity version 5.5.1f1.

Building GPG services, implicitly attempts silent auth

(Filename: ./artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

    from boolean com.unity3d.player.UnityPlayer.nativeRender()
"UnityMain" prio=5 tid=21 Runnable
  at com.unity3d.player.UnityPlayer.nativeRender(Native method)
  at com.unity3d.player.UnityPlayer.a(unavailable:-1)
  at com.unity3d.player.UnityPlayer$b$1.handleMessage(unavailable:-1)
  at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
art/runtime/java_vm_ext.cc:441]     from boolean com.unity3d.player.UnityPlayer.nativeRender()
art/runtime/java_vm_ext.cc:441] "UnityMain" prio=5 tid=21 Runnable
art/runtime/java_vm_ext.cc:441]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
art/runtime/java_vm_ext.cc:441]   at com.unity3d.player.UnityPlayer.a(unavailable:-1)
art/runtime/java_vm_ext.cc:441]   at com.unity3d.player.UnityPlayer$b$1.handleMessage(unavailable:-1)
art/runtime/java_vm_ext.cc:441]   at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
art/runtime/runtime.cc:366] "UnityMain" prio=5 tid=21 Native
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer.a(unavailable:-1)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer$b$1.handleMessage(unavailable:-1)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
art/runtime/runtime.cc:366] "UnityMain" prio=5 tid=21 Runnable
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer.nativeRender(Native method)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer.a(unavailable:-1)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer$b$1.handleMessage(unavailable:-1)
art/runtime/runtime.cc:366]   at com.unity3d.player.UnityPlayer$b.run(unavailable:-1)
art/runtime/runtime.cc:366] "UnityChoreographer" prio=5 tid=26 Native

Update: I manually copied older 10.0.1 version of Google Play Services client aar files from m2 repository. Older version seems to be working as expected.

I'm having exactly the same issue with Unity 5.5.1p3 and the latest Android SDK downloads and plugin - crashing when initiating GPGS.

I can't find downloads to the older 10.0.1 aars, are they available online?

Edit: Found the 10.0.1 aars and there's no issue with logging in with them. 10.2.0 aars are the cause of the crash for me too.

I think I am having the same error:

02-18 15:45:18.885: W/dalvikvm(4498): Class 'Lcom/google/android/gms/games/NativeSdkCallbacks;' implements non-interface 'Lcom/google/android/gms/nearby/connection/Connections$ConnectionRequestListener;'

02-18 15:45:18.885: W/dalvikvm(4498): Link of class 'Lcom/google/android/gms/games/NativeSdkCallbacks;' failed
02-18 15:45:18.885: E/GamesNativeSDK(4498): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.IncompatibleClassChangeError: com/google/android/gms/games/NativeSdkCallbacks.

02-18 15:45:18.885: E/dalvikvm(4498): ERROR: couldn't find native method
02-18 15:45:18.885: A/libc(4498): Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 4513 (main)

I was gonna open an exact same issue here. The latest version of Google Play Services is indeed incompatible with the Unity plugin. I lost over 5h debugging this and finally fixed it.

My fix: revert, on the SDK folders, the google repository back to the previous version (I had version 41 here) and also google play services back to version 38. Im not sure which one did the trick (I believe the repository), but I did it on both to be safe.

I reverted the SDK folder using Time Machine, I dont if there's a way to do it manually, but in case you are desperate (as I was - I was almost reverting my whole computer to 3 days ago using Time Machine), I believe you could simply delete all the 10.2.0 subfolders from the play services part of the repository and then change inside source.properties and the package.xml to point to version 41.

Just to be clear, the folder Im talking about is: /extras/google/m2repository (and also google/google_play_services but I believe this 2nd one you might not need to touch as it only contains javadocs etc)

If you need any more info to revert or file contents etc just post here and I will try to promptly help (I will subscribe to this issue).

Here is how I worked around this issue:

  1. Go to Assets > Play Services Resolver > Android Resolver > Settings
  2. Un-tick Enable Background resolution (This will suppress the update notifications once we downgrade the .aar files)
  3. Go to \extras\google\m2repository\com\google\android\gms
  4. Inside each of the folders there are version folders (such as 10.0.1, 10.2.0). And inside those are the .aar files we need.
  5. We will need the following files:
  • play-services-ads-10.0.1.aar
  • play-services-ads-lite-10.0.1.aar
  • play-services-auth-10.0.1.aar
  • play-services-auth-base-10.0.1.aar
  • play-services-base-10.0.1.aar
  • play-services-basement-10.0.1.aar
  • play-services-clearcut-10.0.1.aar
  • play-services-drive-10.0.1.aar
  • play-services-games-10.0.1.aar
  • play-services-gass-10.0.1.aar
  • play-services-nearby-10.0.1.aar
  • play-services-tasks-10.0.1.aar
  1. Under \Assets\Plugins\Android delete the 10.2.0 versions of the .aar files above, with their META files.
  2. Copy the 10.0.1 versions over
  3. Build and run your project.

If you don't do Step 2, Play Services Resolver will keep asking you to update these .aar files.

I hope I was able to help anyone encountering this issue.

Edit: Removed the image of the list of files and wrote them down instead. For easier copy-paste and indexing.

I was having the same problem. For me the crash occurs in this line when trying to sign into the google game play services:
Social.localUser.Authenticate(...);

So you can either comment out that line (which means none of the GPGS will work since they all require a sign in, but you can develop against the rest of your game) or you can revert all the aar files as @tolgau suggested above and the sign in will go back to working.

Having same problem with Unity version 5.4.3f1 and GPGS version 39 tested in Android 4.4.2

I/Unity   (12790): GooglePlayGames.PlayGam
W/dalvikvm(12790): Class 'Lcom/google/android/gms/games/NativeSdkCallbacks;' implements non-interface 'Lcom/google/android/gms/nearby/connection/Connections$ConnectionRequestListener;'
W/dalvikvm(12790): Link of class 'Lcom/google/android/gms/games/NativeSdkCallbacks;' failed
E/GamesNativeSDK(12790): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.IncompatibleClassChangeError: com/google/android/gms/games/NativeSdkCallbacks.
E/dalvikvm(12790): ERROR: couldn't find native method
F/libc    (12790): Fatal signal 11 (SIGSEGV) at 0x00000018 (code=1), thread 12815 (main)

you can use following to copy files described in @tolgau's workaround.

cd <Android SDK Folder>/extras/google/m2repository/com/google/android/gms

cp ./play-services-ads/10.0.1/play-services-ads-10.0.1.aar ./play-services-base/10.0.1/play-services-base-10.0.1.aar ./play-services-ads-lite/10.0.1/play-services-ads-lite-10.0.1.aar ./play-services-auth/10.0.1/play-services-auth-10.0.1.aar ./play-services-auth-base/10.0.1/play-services-auth-base-10.0.1.aar  ./play-services-basement/10.0.1/play-services-basement-10.0.1.aar ./play-services-clearcut/10.0.1/play-services-clearcut-10.0.1.aar ./play-services-drive/10.0.1/play-services-drive-10.0.1.aar ./play-services-games/10.0.1/play-services-games-10.0.1.aar ./play-services-gass/10.0.1/play-services-gass-10.0.1.aar ./play-services-nearby/10.0.1/play-services-nearby-10.0.1.aar ./play-services-tasks/10.0.1/play-services-tasks-10.0.1.aar <Asset Folder>/Plugins/Android

I followed @tolgau now i don't get the crash, but i am not able to signin either.
My Signin functionality isn't working and i m able to initiate the google play services on my app.

Tried the proposed solution but now Unity has Android build error (v5.4.4f1):
Moving Temp/StagingArea/android-libraries/play-services-10.0.1/classes.jar to Temp/StagingArea/android-libraries/play-services-10.0.1/libs/classes.jar: No such file or directory

Any ideas?

Hello,

I have the same problem but before I update everything my projet was using 8.4.0 aars.
So I cannot rollback from 10.2.0 to 10.0.1. Where can I get 10.0.1 aars files ?

I have look a bit but cannot find a solution to get them.

@tolgau solution works. Thank you so much! I was on the verge of giving up and now works perfectly.

I changed aar files 10.2.0 to 10.0.1 and build with latest google play services version and unity plugin . But app don't initiate google play services with error messages.

Can't register class com/google/android/gms/games/Games: an exception occurred.

Should i change google play services version or plugin version?
If so how can i change version?

Here is all the 10.0.1 aar files. You can manually install or install via unity package. Be sure to delete your 10.2.0 aar files first

https://drive.google.com/folderview?id=0B-w9u2zDKrHGUmtjMmk2VDhhSjA

Also I decided to use PlayGamesPlatform.Instance.Authenticate instead of Social.localUser.authenticate

@mcneproj thank you ... I'll test it after work (yes it is for a personal project).

@rxra let me know what you find out. I hope that helps it took me 30 minutes or more to find and add all aar files from sdk. Huge thanks to @tolgau for clairfying the issue. It was driving me mad lol.

thank you! @mcneproj I missed a aar file. I find aar file from your unitypackage and fixed it. Also thanks to @tolgau

ok, no more crash
thank you

thank you @tolgau after 2 days you make me happy (adams谋n)

Works, no more crash. Thanks, guys

We ran into the same crash issue with Unity 5.4.3f and downgrading the dependencies to 10.0.1 fixed the issue for Android. However we struggled to get our iOS build working. The Play Services Resolver settings mentioned by @tolgau disabled messed up the dependency resolution for XCode but we got that working by hacking GPGSDependencies.cs and manually creating Pod files.

@tolgau Thank you for run-down. Been struggling with this for a couple days now.

Hello, all other things are working but i can't find "Go to Assets > Play Services Resolver > Android Resolver > Settings" so i can't untick background resolution so getting update prompt again n again. Please help with this. I checked but can't locate Android Resolver

@annie4oct it is not a folder from window tabs ( like a file, edit tab) from Assets tab Play services revolver > Android resolver > settings

Hello,
I've tried the steps as @tolgau mentioned, but when i replace those aar files with version 10.0.1 i get the following error when I trz to build the game: Unable to convert classes into dex format.

D:/Program Files/Java/jdk1.8.0_111\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Users/Prdik/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "D:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaui;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzauj;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzauk;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaul;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaum;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaum$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaun;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzauo;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzaup;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at SDKMain.main(SDKMain.java:129)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
... 9 more
]
stdout[
...

Has anybody encountered this issue?
Thanks

@vitvepav is it possible you missed one of the files? I remember getting "already added" errors after forgetting to replace one of the 10.2.0 files.

@tolgau you are a genius, this fixed my bug. if google updates the unity plugin, will I still get the updates using this method?

Does anyone know, is this issue with the plugin, or with google sdk?

For what I understand it is an issue with the plugin which as not been updated to match last version of SDK. Possibly "we" can fix it by diving into the code of the plugin.

Thanks @tolgau you were right. I also had firebase plugin in unity, so I also had to revert these files:

  • firebase-analytics-10.2.0
  • firebase-analytics-impl-10.2.0
  • firebase-messaging-10.2.0

...to version 10.0.1.

@malisasmaz, Thanks Got it.

Thanks @tolgau you saved my life!(Sa臒ol)

omg thanks dude i was trying to days for this issue and was getting mad...So th eproblem is from google? or unity?

Unfortunately, this makes this plugin incompatible with the Firebase plugin which requires 10.2.0. Spent countless hours trying to debug this stuff...

I got this issue too! Is that any workaround if I insist want to use 10.2.0?

@liccowee I think the only solution is to get Unity plugin fixed.

Same issue and I couldn't get it to work with firebase.

i revert the files back to 10.0.1 and now got errors:
clipboard

any ideas?

@mcneproj that worked. Thanks!

I've been looking at an issue with this for the past 13 days now and have tried many different options to troubleshoot. I see something different that shows up on mine when I apply some of the fixes on this thread:

FileNotFoundException: Could not find file "***\AppData\Local\Android\sdk\extras\google\m2repository\com\google\android\gms\play-services-ads\10.0.1\play-services-ads-10.0.1.pom". System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:305) System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363) System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:167) System.IO.StreamReader..ctor (System.String path) (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string) Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List1 repoPaths)
Google.JarResolver.PlayServicesSupport.GetCurrentDependencies (System.Collections.Generic.Dictionary2 dependencies, System.String destDirectory, Google.JarResolver.ExplodeAar explodeAar, System.Collections.Generic.List1 repoPaths)
Google.JarResolver.PlayServicesSupport.DependenciesPresent (System.String destDirectory, Google.JarResolver.ExplodeAar explodeAar)
GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.AutoResolve ()
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:197)
`

Mine shows a missing ".pom" file for play services even though I have all the .aar files in the right places.

Any suggestions?

Any idea when this is going to be fixed?

@tolgau thanks very much.
it works.
Google Play Games plugin for Unity version : 0.9.36

@tolgau problem is solved thanks to you!

Thanks for posting the 10.0.1 workaround.

Is there any update on when this will be fixed for 10.2.0? I'd prefer updating the plugin to a newer version to manually changing libraries.

Update to fix working with 10.2 should be ready this week.

Great to hear Clay! Been waiting for it :)

This is fixed in version 0.9.37.

While the first time I had this problem I solved it just substituting all the files like it is said here, today I had to delete all the GPGS folders and reimport them. Well, it is crashing when I try to log in, even if I'm using the version 0.9.37, I tried with the play-services 10.2.1 and 10.0.1 versions and they're not working.

Any suggestion?

Hi
I have the same issue and copying the 10.0.1 files did not do the trick for me.
I'm quite new with unity and this Google Games Service implementation is my first attempt
I have Unity Version 5.5.0f3 Personal and
And play-games-plugin-for-unity-master 0.9.37.
Fallowed the help of @tolgau did not work
and also tried @vitvepav with the firebase-analytics... files but now sure where to put them.

Any suggestion?

Hi
Finally made it work. !!!
I have Unity Version 5.5.0f3 Personal and
And play-games-plugin-for-unity-master 0.9.37.

For me copying the 10.0.1 .aar files did not work.
So here is what i did.
-Start Unity has Administrador.
-Import the play-games-plugin-for-unity-master 0.9.37.
-In the Android Player Settings\Other Settings\ Changed _Minimum API Level_ to 4.0
-Menu Windows\Google Play Games\Setup\Android Setup , click on Setup (If prompt, accepted to update to 10.2.1)

Then it worked... maybe luck, but for me it finally work and with Google Play Services library version 10.2.1

Hope will work for others

I have Unity 5.6, play-games-plugin-for-unity-master 0.9.37, but the app crash even if I downgrade to 10.0.1

It's not working!!! Unity 5.6 and downgrading to 10.0.1 just CRASH my app on Start :/

@tolgau thanks, it's working for me, Unity 5.6.0f3 and GooglePlayGamesPlugin-0.9.36

On Unity 5.6.0f3 using Google Play sevices 10.2.1 and I can confirm this issue is still present Downgrading to 10.0.1 fixed it though

I can confirm that ver. 0.9.38a with Unity 5.5.0p1 and latest Play Games SDK STILL crashes the launch. Reverted to plugin ver. 0.9.36 and keeping .aar files at ver. 10.0.1 fixed the issue.

I am having the same problem and I am struggling for weeks... please help :(

`Google Play Services packages found with incompatible versions.

All packages in Google Play Services must be at the same version.
Attempting to resolve the problem by using the most recent version (10.2.4) of all packages.

Found the following package references:
com.google.firebase:firebase-analytics:10.2.0
com.google.android.gms:play-services-base:10.2.4
com.google.firebase:firebase-common:10.2.4
com.google.firebase:firebase-auth:10.2.4
com.google.android.gms:play-services-ads:LATEST
com.google.android.gms:play-services-basement:10.2.0
com.google.firebase:firebase-common:10.2.0
com.google.firebase:firebase-analytics-impl:10.2.0
com.google.android.gms:play-services-basement:10.2.4
com.google.android.gms:play-services-tasks:10.2.4
com.google.android.gms:play-services-ads-lite:10.2.4
com.google.android.gms:play-services-clearcut:10.2.4
com.google.android.gms:play-services-gass:10.2.4
com.google.android.gms:play-services-tasks:10.2.0
com.google.firebase:firebase-iid:10.2.0`

@ValTudor you have at least 2 GPS outdated packages (basement and tasks are in ver. 10.2.0, while the others are in ver. 10.2.4) Also check the actual version of ads. I'm pretty sure here are some comments of people saying Firebase isn't working with Play Services above ver 10.2.0 so maybe you should be working with that version of GPS packages.

I am having the same issue ...
Unity 5.6.1p1 with Plugin 0.9.36 and play-service 10.0.1

@Calvin2274 - did you try to update to the latest version (0.9.39) and play-services 10.2.6?

If you are still having problems, please open a new issue and include a log.

Thanks!

I'm using 11.0.0, no crash,

https://developers.google.com/android/guides/setup

Google Account Login    com.google.android.gms:play-services-auth:11.0.1

no crash when use google play service 11.0.0 and 0.9.39a

// used to get the right version of dependencies.
public const string PlayServicesVersionConstraint = "11+";

Using GPGS 0.9.41 and Unity 5.5.2f1 crashes after try to authenticate.
Also i created another test project with only 4 buttons("activate", "authenticate", "show_achievements", "show_leaderboards"), signed it, loaded in dev console, created services, created xml, etc...
No any reaction after:

PlayGamesPlatform.Activate();

And app crashes after:

Social.localUser.Authenticate((bool isSuccessful) => {Debug.log(isSuccessful)});

@tolgau solution didn't help.
Just don't know, what to do...

Hi
Same problem here the solution of @tolgau didn't work for me , using same version as @IgnatevSV , @IgnatevSV did you managed to make it work ?

@blookmaker Hi! Well, i start to use GPGS 0.9.36 and it seems OK. I use Unity 5.5.2f1 by the way.
Also i had "Resolution Exception" problem, but it solved by this solution:
http://answers.unity3d.com/questions/1347425/problem-with-adds-play-services.html

Hello! Could somebody please upload Google Play Games plugin for Unity version: 0.9.36 somewhere and provide the link? Thank you very much!

@CavumSubarachnoidale https://drive.google.com/file/d/0B_489rkt2pmrdUlld0EzQUZJT0E/view?usp=sharing and you always may download it from github.com repo using commit.

@ihhha thank you very very much and 斜芯谢褜褕芯械 褋锌邪褋懈斜芯!

Hello, 30 hours in this loop. Why?

Have been struggling with this issue for days.
Unity 2018.2.12f1, GPGS 0.9.50 and GoogleMobileAds 3.15.1. I also have Firebase Analytics installed.
Works fine on iOS, crashes immediately on Android. If I remove either GPGS or GoogleMobileAds, it works fine, but never with both existing in the project.

https://github.com/playgameservices/play-games-plugin-for-unity/issues/2217#issuecomment-417619382

Can confirm this works:
open template-AndroidManifest.txt
"\ APP_ID" to "\u003__APP_ID__"
setup GPGS from Unity (press Window/Google Play Services/Setup)

True, after the correction, I received the error "Authentification failed". But it was a problem with SHA-1. It was decided when I did
keytool -exportcert -keystore user.keystore -list -v
And put the correct SHA-1 in https://console.developers.google.com/apis/credentials in the application settings.

I had already tried that but did so again. Unfortunately, it doesn't fix the issue in my case

GPGS 0.9.51 fixed everything, yay!

GPGS 0.9.51 fixed everything, yay!

@GrafosGames Which unity version? Your google play services works now?

Unfortunately, I'm back at square one with this. I noticed my ad banner was not working (my interstitial ad did). I decided to upgrade to the newest GPGS and Firebase and it crashes again. Like before, it's a matter of having both GPGS and GoogleMobileAds installed. The moment I remove one of the two and I force resolve, the game works fine. This issue has been exhausting and comedically long now...

GPGS 0.9.53
GoogleMobileAds 3.15.1
Unity 2018.2

Hope I'm not speaking too soon again, but this seems to have resolved the crash

Unity 2018.2.5f1
GPGS 0.9.53
Facebook SDK
Unity IAP 1.20.1
CloudOnce 2.6.2
all the Play-Services .aar files are 15.0.1

Crashes after calling Cloud.Initialize, and it doesn't let me throw an exception. If I don't call the initialize everything works fine, except the sign in and leaderboard of course.

The issue still reproduces, @claywilkinson should reopen it.

Unity 2017.4.18f1 for Windows targeting Android
Play Games Plugin 0.9.61
Resolver 1.2.102.0 has resolved dependencies to 16.0.0 like com.google.android.gms.play-services-nearby-16.0.0.aar or 26.1.0 like com.android.support.support-v4-26.1.0.aar.

Crashes on startup after logging line signInClient.silentSignIn with the following error message tagged as E/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/%package-name%/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.jar).

How can I fix this?

Unity 2018.2.5f1
GPGS 0.9.53
...
all the Play-Services .aar files are 15.0.1

Crashes after calling Cloud.Initialize...

@Jordan1257 Have you found a workaround for this bug?

@claywilkinson, issue exist in my project too
Unity 2018.3.1f1
Play Games Plugin 0.9.61 (all aars)
Facebook SDK
Firebase (com.google.firebase:firebase-core:16.0.7, com.google.firebase:firebase-messaging:17.4.0)

I had same problem with app crash on start but after several actions I made it to work. I don't know which step was a fix so here's all of them. Maybe it will be helpful for somebody:

I'm using Unity 2018.3.6f1, Play Games Plugin 0.9.61 and Google Mobile Ads Unity Plugin v3.15.1.

Make sure you have last versions of Google Play Services, Android Support Library, Android Support Repository, Google Repository and Android 6.0 (I didn't have that in my case) in SDKManager as it mentioned in docs.

I installed Play Games and Mobile Ads plugins in next order: Play Games plugin first, then Mobile Ads plugin but without importing PlayServicesResolver (untick it in imort window).

When resolving was finished (run it manually if didn't start automatically) I setupped Play Services by adding resources from Play Console.

Make sure that in Assets\GoogleMobileAds\Editor\GoogleMobileAdsDependencies.xml you have right package version! In my case that was:

<androidPackage spec="com.google.android.gms:play-services-ads:15.0.1">

I replaced that to

<androidPackage spec="com.google.android.gms:play-services-ads:16.0.0">

and all plugins seems to work now.

Unity 2018.2.5f1
GPGS 0.9.53
...
all the Play-Services .aar files are 15.0.1
Crashes after calling Cloud.Initialize...

@Jordan1257 Have you found a workaround for this bug?

@qbit86 - I did eventually manage to get it to work, but only after a bunch of refactoring laid out in IDmikael's answer. I have also since removed Facebook's plugin. As another note, when I tried updating the project to Unity 2018.3+, it broke everything again (probably the same android files) and had to revert back to 2018.2.5f1.

@IDmikael - thanks! I had basically done the same process over the course of a couple days.

It was libgpg.so who caused this issue. After removing forlder Assets/GooglePlayGames/ of version 0.9.36, and importing new version of plugin 0.9.62, libgpg.so remains and messes up builds.

The issue "W/dalvikvm(12790): Class 'Lcom/google/android/gms/games/NativeSdkCallbacks;' implements non-interface 'Lcom/google/android/gms/nearby/connection/Connections$ConnectionRequestListener;'" is simple, which means that, NativeSdkCallBack is using the Connections class.

So you need to find out which jar file has NativeSdkCallBack Class in it, turns out it is in "com.google.android.gms.play-services-games", so if you upgrade it to 17.0.0, the issue is fixed.

Steps to fix
1 -> Turn off Play Service Resolver > Android Resolver > Settings > Enable Auto Resolution,
2 -> Delete the play-services-games.aar file in the Plugins > Android folder,
3 -> Download play-services-gamesv17.0.0 (i used Android Stuido and got it ) and run, it works as a charm

If you know how to specify in unity how to get to v17.0.0, then let me know

@naveedabdullah How did you download the "play-services-gamesv17.0.0" from Android Studio? I was looking for it in the SDK tools, but could not figure it out how to do it

Same error. Newest version for everything, except for unity 2018.3.6f1 (stable).
Error happens right after I call Social.localUser.Authenticate...

@Clawf try find and remove all libgpg.so files from your project. These files were located in Assets/Plugins/Android/libs/**/libgpg.so path in my case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

temresen picture temresen  路  4Comments

hippogamesunity picture hippogamesunity  路  5Comments

ivribalko picture ivribalko  路  3Comments

Only4Gamers picture Only4Gamers  路  4Comments

mattr-swol picture mattr-swol  路  4Comments