playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.46k stars 966 forks source link

Error creating a GameServices object. #289

Closed georgepiva closed 9 years ago

georgepiva commented 9 years ago

When activating the PlayGamesPlatform and trying to authenticate the local user I see the next exception happening:

I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Activating PlayGamesPlatform.
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: PlayGamesPlatform activated: GooglePlayGames.PlayGamesPlatform
I/Unity   (11264): Attempting to authenticate local user on Play Games.
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Creating platform-specific Play Games client.
I/Unity   (11264):  [Play Games Plugin DLL] 11/22/14 12:32:38 -05:00 DEBUG: Creating real IPlayGamesClient

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

I/Unity   (11264): InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
I/Unity   (11264):   at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.Native.NativeClient.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
I/Unity   (11264):   at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 

Errors from GamesNativeSDK:

E/GamesNativeSDK(11264): Can't register class com/google/android/gms/games/snapshot/SnapshotContents: an exception occurred.
E/GamesNativeSDK(11264): Could not register one or more required Java classes.

What does this error mean and how can I fix it?

Identical question posted to SO: http://stackoverflow.com/questions/27082532/error-creating-a-gameservices-object

georgepiva commented 9 years ago

https://github.com/playgameservices/play-games-plugin-for-unity/issues/280 fixed this issue.

@mrggl said:

This might be an issue with the fact that the current plugin has transitive dependency on libc++_shared.so - that's the case, linking against the standard libraries statically might fix this problem.

I've committed a statically linked version of libgpg here: https://github.com/playgameservices/play-games-plugin-for-unity/tree/debug_libgpg/debug. Overwrite the old versions of libgpg with these and see if that addresses the issue!