Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Creating a GameServices object. #884

Closed
shreychowdhary opened this issue Dec 23, 2015 · 18 comments
Closed

Error Creating a GameServices object. #884

shreychowdhary opened this issue Dec 23, 2015 · 18 comments

Comments

@shreychowdhary
Copy link

12-23 13:09:53.369 26779 26797 I Unity : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x0002d] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\PInvo
ke\GameServicesBuilder.cs:186
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x000a6] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:189
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.NativeClient.Authenticate (System.Action1 callback, Boolean silent) [0x00099] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128 12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00026] in J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275

@claywilkinson
Copy link

This message: InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK usually means that the Android SDK is too old. You should update the Google Play services, Google Repository, Android Support Library, and Android Support Repository components. Then run the Google Play Games plugin setup again for your project to copy over the updated files.

You can get to the SDK manager from Unity via Window > Google Play Games > Downloads > Google Play Games SDK (Android).

@shreychowdhary
Copy link
Author

All of these packages are already up to date and it still doesn't work

@claywilkinson
Copy link

Earlier in the log it will list the problem, can you share that part or the log?

@shreychowdhary
Copy link
Author

Here is some more of the log
[Play Games Plugin DLL] 12/23/15 17:18:22 -05:00 DEBUG: Creating platform-specific Play Games client.
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
GooglePlayGames.OurUtils.Logger:d(String) (at J:\FlyBy\Assets\GooglePlayGames\OurUtils\Logger.cs:58)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:300) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275)
GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48) GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129) UnityEngine.Events.InvokableCall:Invoke(Object[]) UnityEngine.Events.InvokableCallList:Invoke(Object[]) UnityEngine.Events.UnityEventBase:Invoke(Object[]) UnityEngine.Events.UnityEvent:Invoke() UnityEngine.UI.Button:Press() (at C:\buildslave\unity\bui [Play Games Plugin DLL] 12/23/15 17:18:22 -05:00 DEBUG: Creating Android IPlayGamesClient Client UnityEngine.Debug:Internal_Log(Int32, String, Object) UnityEngine.Debug:Log(Object) GooglePlayGames.OurUtils.Logger:d(String) (at J:\FlyBy\Assets\GooglePlayGames\OurUtils\Logger.cs:58) GooglePlayGames.PlayGamesClientFactory:GetPlatformPlayGamesClient(PlayGamesClientConfiguration) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\PlayGamesClientFactory.cs:34) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:301)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
UnityEngine.Events.InvokableCall:Invoke(Object[])
UnityEngine.Events.InvokableCallLi
Building GPG services, implicitly attempts silent auth
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:187)
GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
UnityEngine.Events.InvokableCall:Invoke(Object[])
UnityEngine.Events.InvokableCallList:Invoke(Object[])
UnityEngine.Events.
InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x0002d] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\PInvo

@claywilkinson
Copy link

That's the right section, but can you not filter the log and share the raw logcat?

@shreychowdhary
Copy link
Author

Here the problem is it can't register one of the Java classes
Unity : Building GPG services, implicitly attempts silent auth
Unity : UnityEngine.Debug:Internal_Log(Int32, String, Object)
Unity : UnityEngine.Debug:Log(Object)
Unity : GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\Nativ
Unity : GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Nativ Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\P
Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesP Unity : GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGames
Unity : GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
Unity : UnityEngine.Events.InvokableCall:Invoke(Object[])
Unity : UnityEngine.Events.InvokableCallList:Invoke(Object[])
Unity : UnityEngine.Events.
GamesNativeSDK: Could not register one or more required Java classes.
Unity : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK

@claywilkinson
Copy link

Yep, that's it. If you look at the whole log, the class not being loaded will be listed. Then the aar or jar file for that class needs to be added to the project. I think the error comes out pretty early when the process is starting...

@shreychowdhary
Copy link
Author

"GamesNativeSDK: Can't register class com/google/android/gms/appstate/AppStateManager: an exception occurred." Is the the class that isn't being loaded and if so how would I add it to the project. Thanks so much for your help so far.
GamesUnitySDK: Performing Android initialization of the GPG SDK
GamesNativeSDK: Can't register class com/google/android/gms/appstate/AppStateManager: an exception occurred.
Unity : Building GPG services, implicitly attempts silent auth
Unity : UnityEngine.Debug:Internal_Log(Int32, String, Object)
Unity : UnityEngine.Debug:Log(Object)
Unity : GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:187)
Unity : GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128) Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305)
Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) Unity : GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
Unity : GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
Unity : UnityEngine.Events.InvokableCall:Invoke(Object[])
Unity : UnityEngine.Events.InvokableCallList:Invoke(Object[])
Unity : UnityEngine.Events.
GamesNativeSDK: Could not register one or more required Java classes.

@shreychowdhary
Copy link
Author

I was able to fix it thanks

@claywilkinson
Copy link

Great! The class com/google/android/gms/appstate/AppStateManager was removed from the Android SDK, this means there was an old gpg.so (The Game services C++ SDK). Did you remove an old one or update the plugin?

@shreychowdhary
Copy link
Author

I'm sorry for taking so long to respond. I completely reinstalled the
plugin. I suspect that when I updated earlier, I left traces of the old
plugin. Thanks for your work on the plugin.

On Wed, Dec 23, 2015 at 11:02 PM, Clayton Wilkinson <
notifications@github.com> wrote:

Great! The class com/google/android/gms/appstate/AppStateManager was
removed from the Android SDK, this means there was an old gpg.so (The Game
services C++ SDK). Did you remove an old one or update the plugin?


Reply to this email directly or view it on GitHub
#884 (comment)
.

@claywilkinson
Copy link

Great! glad you got it working.

@tnbao91
Copy link

tnbao91 commented Jan 21, 2016

I have a same problem. Can you show me how to fix it ?

@felipecaldas
Copy link

Yeah, same problem here. Currently on version 8.4.0 but when I upgrade to 9.4.0 I get DEX error... Guess I need to keep trying!

@felipecaldas
Copy link

Yeah, it's working now. Had to delete AdMob and GPlay and reimport everything back again...

@haseebahmad109
Copy link

I am facing the same issue after updating to the latest build, can you please guide me how to resolve this error ?

@AlcantaraRW
Copy link

Same problem here... I'm using the latest build (0.9.34).

@qbit86
Copy link
Contributor

qbit86 commented Oct 5, 2016

Similar issue. Either DEX build error, or run-time failure depending on which versions of play-services-*.aar used.

@AlcantaraRW Connected issue: #1382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants