Reputation: 1
I'm currently making an Android game that will use Google Play Games for Cloud Saving. I've downloaded the Google Play Games SDK and added it to Unity, and followed Unity's tutorial for logging in (https://docs.unity.com/ugs/manual/authentication/manual/platform-signin-google-play-games ). I've gone through different steps to set it up (added the OAuth for both Android and Web, added myself as a tester, and tested on my device) but I can't seem to get it working. After doing some debugging, I realize the problem occurs with this line of code
PlayGamesPlatform.Activate();
Here is a snippet of the code. I'm only including the void in which it's called to not flood this message with code though I'm open to sharing more code if needed. This void is called at Start().
void initialLogIn()
{
debugText.text += "Begin Log In | ";
//Initialize PlayGamesPlatform
PlayGamesPlatform.Activate();
PlayGamesPlatform.DebugLogEnabled = true;
debugText.text += "Activate Play Games Platform | ";
LoginGooglePlayGames();
}
I'm expecting that when the game loads, players can automatically log into their Google Play Account however, the log in native pop up doesn't appear.
I ran the Android LogCat and I've noticed I've gotten the following errors:
2024-07-21 22:41:25.959 23612 23673 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
2024-07-21 22:41:25.959 23612 23673 Error Unity java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
2024-07-21 22:41:25.959 23612 23673 Error Unity at java.lang.Class.classForName(Native Method)
2024-07-21 22:41:25.959 23612 23673 Error Unity at java.lang.Class.forName(Class.java:536)
2024-07-21 22:41:25.959 23612 23673 Error Unity Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.PlayGames" on path: DexPathList[[zip file "/data/app/~~kEIMtZEHFF7OzIloMOW6LQ==/com.barkunjgames.dressipher-j24w2j_UTad-VS-G0swCrA==/base.apk"],nativeLibraryDirectories=[/data/app/~~kEIMtZEHFF7OzIloMOW6LQ==/com.barkunjgames.dressipher-j24w2j_UTad-VS-G0swCrA==/lib/arm64, /data/app/~~kEIMtZEHFF7OzIloMOW6LQ==/com.barkunjgames.dressipher-j24w2j_UTad-VS-G0swCrA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
2024-07-21 22:41:25.959 23612 23673 Error Unity at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
2024-07-21 22:41:25.959 23612 23673 Error Unity at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2024-07-21 22:41:25.959 23612 23673 Error Unity at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2024-07-21 22:41:25.959 23612 23673 Error Unity ... 2 more
2024-07-21 22:41:25.959 23612 23673 Error Unity at UnityEngine.AndroidJNISafe.CheckExceptio
And also this error earlier on in the logcat:
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Format allocation info not found for format: 3b
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Format allocation info not found for format: 0
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 Invalid base format! req_base_format = (<unrecognized format> 0x0), req_format = (<unrecognized format> 0x3b), type = 0x0
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Unrecognized and/or unsupported format (<unrecognized format> 0x3b) and usage (CPU_READ_NEVER|CPU_WRITE_NEVER|GPU_TEXTURE|GPU_RENDER_TARGET|COMPOSER_OVERLAY 0xb00)
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Format allocation info not found for format: 3b
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Format allocation info not found for format: 0
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 Invalid base format! req_base_format = (<unrecognized format> 0x0), req_format = (<unrecognized format> 0x3b), type = 0x0
2024-07-21 22:41:23.171 23612 23673 Error gralloc4 ERROR: Unrecognized and/or unsupported format (<unrecognized format> 0x3b) and usage (CPU_READ_NEVER|CPU_WRITE_NEVER|GPU_TEXTURE|GPU_RENDER_TARGET|COMPOSER_OVERLAY 0xb00)
Some of the steps I've tried include: • Looking at other Google Log In Tutorials to see if I was missing any steps or if the Log In would work with different code • Looking up different ways on Google to solve this issue (tried what this comment suggested: https://github.com/playgameservices/play-games-plugin-for-unity/issues/3154#issuecomment-1293257681 ) • Tried using Force Resolve in Mobile Dependency Resolver / External Dependency Resolver • Reached out to a few programmer friends
My question is how do I solve the issue of AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames and allow players to log in with their Google Play account?
If it's not possible, then do you have another solution I could look at to allowing Cloud Save?
I tried to get the Google Play Log In popup to occur at the start of my game and nothing happens. I receive a message on my logcat about AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.PlayGames
Upvotes: 0
Views: 364
Reputation: 1
Because Google Games devs are the worst possible. Since 2016 I never setup a GPGS without spending 2 days fixing their errors
Upvotes: 0