Problem signing-in with GPGS.

Hello everyone!

I am trying to use the GPGS plugin and I am facing an error when I attempt to log in. This is what the log looks like:

I/Unity   ( 7910): sign in

I/Unity   ( 7910):  

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

I/Unity   ( 7910): 

D/GamesUnitySDK( 7910): Performing Android initialization of the GPG SDK

I/Unity   ( 7910): Building GPG services, implicitly attempts silent auth

I/Unity   ( 7910):  

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

I/Unity   ( 7910): 

E/GamesNativeSDK( 7910): 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_app_package/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.jar).

Any ideas on how fix this problem?

Thank you!

Here is how I worked around this issue:

Go to Assets > Play Services Resolver > Android Resolver > Settings

Un-tick Enable Background resolution (This will suppress the update notifications once we downgrade the .aar files)

Go to \extras\google\m2repository\com\google\android\gms

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.

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

Under \Assets\Plugins\Android delete the 10.2.0 versions of the .aar files above,
with their META files.

Copy the 10.0.1 versions over
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.

This helped me.

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.