ShowLeaderboardUI() AndroidJavaException: java.lang.ClassNotFoundException: com.google.games.bridge.HelperFragment
Authenticate and report scores works fine. But when I try to call PlayGamesPlatform.Instance.ShowLeaderboardUI() or Social.ShowLeaderboardU() I get error AndroidJavaException: java.lang.ClassNotFoundException:com.google.games.bridge.HelperFragment. I have tried using the Social heavy method and also exclusively using PlayGamesPlatform.Instance methods, none can open a leaderboard and give same error. I am able to upload to internal testing in goole play and test on dev device without google play saying errors.
My project main template gradle uses the new play core that is fragmented (not using 1.10.3) implementation 'com.google.android.play:core-common:2.0.4' // Assets/GooglePlayPlugins/com.google.play.core/Editor/Dependencies.xml:3
Unity 2022.3.50 Android min SDK 24 Android target SDK 34 Play games plugin 0.11.01 EDM4U 1.2.183 also using firebase analytics 12.3.0 also using google play review plugin 1.8.3
I previously was using Unity 2021.3.33 with target SDK 33 and min sdk 22 and firebase 12.0 and everything was working. Note: I have same exact issue when try to upgrade using Unity 2021.3.44 when min SDK 24, target SDK 34, and also updating firebase analytics to 12.3.
I have seen some potentially similar issues but none of their suggestions have had success for me. Generated Local Repo folder is including both gpgs-plugin-support-0.11.01 files with vanilla setup.
here is my mainTemplate.grade after a force resolve:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'com.applovin.mediation:google-adapter:[23.4.0.0]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.1' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.0.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.google.android.gms:play-services-base:18.5.0' // Assets/Firebase/Editor/AppDependencies.xml:17
implementation 'com.google.android.play:core-common:2.0.4' // Assets/GooglePlayPlugins/com.google.play.core/Editor/Dependencies.xml:3
implementation 'com.google.android.play:review:2.0.0' // Assets/GooglePlayPlugins/com.google.play.review/Editor/Dependencies.xml:3
implementation 'com.google.android.ump:user-messaging-platform:2.+' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
implementation 'com.google.firebase:firebase-analytics:22.1.0' // Assets/Firebase/Editor/AppDependencies.xml:15
implementation 'com.google.firebase:firebase-analytics-unity:12.3.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:18
implementation 'com.google.firebase:firebase-app-unity:12.3.0' // Assets/Firebase/Editor/AppDependencies.xml:22
implementation 'com.google.firebase:firebase-common:21.0.0' // Assets/Firebase/Editor/AppDependencies.xml:13
implementation 'com.google.games:gpgs-plugin-support:0.11.01' // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
implementation 'com.tenjin:android-sdk:1.16.1' // Assets/Editor/Dependencies.xml:4
// Android Resolver Dependencies End
**DEPS**
}
Same issue here, not only the Leaderboards but also the Achievements
Same issues. Don't work ShowLeaderboardUI and ShowAchievementsUI
Same here... Uploading a project from API 33 to 34 has led me to encounter the same issue.
Unity 2021.3.44f1 Play games plugin 0.11.01 EDM4U 1.2.183
I found out that the com.google.games.* package is not persisted in the DEX classes of AAB build file and why is this happen... (you can just decompile it for check the package path to class)
Exact same issue, and with the looming November deadline to upgrade to SDK34, this is quite urgent.. tried many things. I'll report back if I have any luck.. but hopefully someone can help us soon.
What I found is that the file containing the com.google.games.* classes is not included in the final AAB. It seems that EDM4U doesn’t properly resolve the GPGS plugin.
I tried the workaround of copying the gpgs-plugin-support-0.11.01.aar and POM files from:
Assets/GeneratedLocalRepo/GooglePlayGames/... (where the AAR files are supposed to be taken from during the build)
to:
Assets/GooglePlayGames/... (where it actually seems to be taking the AAR files from)
I rebuilt the project in Android Studio, and now the achievements UI and leaderboard open correctly. (I still need to do more thorough testing), but everything seems to be working so far.
It worked
What I found is that the file containing the com.google.games.* classes is not included in the final AAB. It seems that EDM4U doesn’t properly resolve the GPGS plugin.
I tried the workaround of copying the gpgs-plugin-support-0.11.01.aar and POM files from:
Assets/GeneratedLocalRepo/GooglePlayGames/... (where the AAR files are supposed to be taken from during the build)
to:
Assets/GooglePlayGames/... (where it actually seems to be taking the AAR files from)
I rebuilt the project in Android Studio, and now the achievements UI and leaderboard open correctly. (I still need to do more thorough testing), but everything seems to be working so far.
Thankyou so much! This worked!
One tip for other people, as this caught me out initially. When I 'force resolved' after doing the copy paste, I ended up breaking things.
Don't do this. Just copy paste over the POM and AAR (you don't need the meta files). Then build your aab/apk file.
Tested this on the internal track and it worked! :) Very happy!
I solved this issue by using External Dependency Manager v1.2.177
What I found is that the file containing the com.google.games.* classes is not included in the final AAB. It seems that EDM4U doesn’t properly resolve the GPGS plugin.
I tried the workaround of copying the gpgs-plugin-support-0.11.01.aar and POM files from:
Assets/GeneratedLocalRepo/GooglePlayGames/... (where the AAR files are supposed to be taken from during the build)
to:
Assets/GooglePlayGames/... (where it actually seems to be taking the AAR files from)
I rebuilt the project in Android Studio, and now the achievements UI and leaderboard open correctly. (I still need to do more thorough testing), but everything seems to be working so far.
Thanks to @frazerbw and @leo3duy for solve this bug. It really works!
fixed it by checking the 'Android' box under 'Select platform for plugin' in the inspector for gpgs-plugin-support-0.11.01.aar
I solved this issue by using External Dependency Manager v1.2.177
This worked for me as well! Thank you very much.
Solution that survived force resolution is
- Move plugin files from
Assets/GooglePlayGames/com.google.play.games/Editor/m2repositorytoAssets/GooglePlayGames/m2repository - Update repository path in GooglePlayGamesPluginDependencies.xml from
<repository>Assets/GooglePlayGames/com.google.play.games/Editor/m2repository</repository>
to
<repository>Assets/GooglePlayGames/m2repository</repository>
- Resolve dependencies
We are using:
Unity 2021.3.44f1 Play games plugin 0.11.01 EDM4U 1.2.183
(tagging https://github.com/playgameservices/play-games-plugin-for-unity/issues/3092 for visibility)
fixed it by checking the 'Android' box under 'Select platform for plugin' in the inspector for gpgs-plugin-support-0.11.01.aar
I use 2.0.0, and this worked for me!
fixed it by checking the 'Android' box under 'Select platform for plugin' in the inspector for gpgs-plugin-support-0.11.01.aar
I am also using version 2.0.0, it worked! Thank you. But an important warning, if you force resolve, the settings will revert to their previous state. You may need to check again before you build.
fixed it by checking the 'Android' box under 'Select platform for plugin' in the inspector for gpgs-plugin-support-0.11.01.aar
This does the trick. Also works with 0.10.14. I wonder why devs can't fix such a critical issue. They don't care?
I am using the latest v2.0.0 with Unity 2022.3x and it worked by enabling the Android platform for gpgs-plugin-support-0.11.01.aar
Passed through this problem here, https://github.com/playgameservices/play-games-plugin-for-unity/issues/3318#issuecomment-2497374461 didn't work here 100%, but I found another fix that worked with EDM4U 1.2.183 and does not break after forced resolving: instead of relying on the buggy behavior of local maven repositories, I'm using the gpgs-plugin-support.<version>.aar directly and using EDM4U only to download its dependencies (which can be found in the gpgs-plugin-support-<version>.pom file).
- Rename the
gpgs-plugin-support-<version>.srcaarfile togpgs-plugin-support-<version>.aar(changed extension from "srcaar" to "aar"). Unity will detect it as an Android native plugin right away. - In
GooglePlayGamesPluginDependencies.xml, instead of declaringcom.google.games:gpgs-plugin-support:<version>as a dependency with custom maven repo, we just declare its dependencies directly (these specific versions are fromgpgs-plugin-support-0.10.14.pom, change depending on your plugin version):<?xml version="1.0" encoding="UTF-8"?> <dependencies> <androidPackages> <androidPackage spec="com.google.android.gms:play-services-games:21.0.0" /> <androidPackage spec="com.google.android.gms:play-services-auth:19.2.0" /> <androidPackage spec="com.google.android.gms:play-services-nearby:18.0.0" /> </androidPackages> </dependencies> - Resolve dependencies with EDM4U and build normally: Unity will embed
gpgs-plugin-support-<version>.aaras expected. - (optional) Move the .aar to another folder and remove the "m2repository" folder, only the .aar is necessary for the build.
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
namespace Assets.Plugins.??????????.Editor
{
public class PreprocessBuild : IPreprocessBuildWithReport
{
public int callbackOrder => 999;
public void OnPreprocessBuild(BuildReport report)
{
const string path = "Assets/GeneratedLocalRepo/GooglePlayGames/Editor/m2repository/com/google/games/gpgs-plugin-support/0.10.14/gpgs-plugin-support-0.10.14.aar";
((PluginImporter) AssetImporter.GetAtPath(path)).SetCompatibleWithPlatform(BuildTarget.Android, true);
}
}
}
fixed it by checking the 'Android' box under 'Select platform for plugin' in the inspector for gpgs-plugin-support-0.11.01.aar
I had the same issue, and this resolved it for me. Thank you.
Still present in 2.0.0, the file is gpgs-plugin-support-2.0.0.aar but same step to fix: checking the 'Android' box under 'Select platform for plugin' in the inspector
Ok google, just fix this, the current version DOESN'T work out of the box!!! It is well identified, easy to fix, and I lost hours on this, as many other probably have
Haha, they don't want to fix this since Oct 2024.
This is such a blatant oversight, I don't understand how these amateurs at Google can't fix it.
Hi there)
Hello, I’m using Unity 6 and I’m encountering the same issue: AndroidJavaException: java.lang.ClassNotFoundException: com.google.games.bridge.HelperFragment
I’ve already checked the “Android” platform checkbox for gpgs-plugin-support-2.0.0.aar and moved the AAR file to Plugins/Android, but nothing helped.
If anyone has experienced the same issue, please share how you resolved it.
gpgs-plugin-support
This worked for me, I am using version 2.0.0 of Google Play Games Plugin. search the file name "gpgs-plugin-support-0.11.01.aar" in the project window and In the inspector, under Select platfoms for plugin - > Include platform -> Check Android.
Still not fixed, Amazing 💯
gpgs-plugin-support
This worked for me, I am using version 2.0.0 of Google Play Games Plugin. search the file name "gpgs-plugin-support-0.11.01.aar" in the project window and In the inspector, under Select platfoms for plugin - > Include platform -> Check Android.
hello, how did u find gpgs-plugin-support-0.11.01.aar instead of gpgs-plugin-support-2.0.0.srcaar after upgrading to gpg v2 with clean imstall as suggested in plugin page?
gpgs-plugin-support
This worked for me, I am using version 2.0.0 of Google Play Games Plugin. search the file name "gpgs-plugin-support-0.11.01.aar" in the project window and In the inspector, under Select platfoms for plugin - > Include platform -> Check Android.
hello, how did u find gpgs-plugin-support-0.11.01.aar instead of gpgs-plugin-support-2.0.0.srcaar after upgrading to gpg v2 with clean imstall as suggested in plugin page?
ProjectUnity\Assets\GeneratedLocalRepo\GooglePlayGames\com.google.play.games\Editor alright enabling platform android worked for me unity 2022.3.62 with EDM 1.2.186 and GPG 2. Thankyou All there are still many errors in latest unity 22 which are unexpected for a old lts tier version, it feels they added issues as there were not many before 🤣
Still not fixed in 2.1.0, I have to include Android platform on gpgs-plugin-support-2.1.0.aar file every time before building a game.
Enabling it from a prebuild script works time to time.
пн, 25 авг. 2025 г., 18:42 Vasily @.***>:
pou1gray left a comment (playgameservices/play-games-plugin-for-unity#3318) https://github.com/playgameservices/play-games-plugin-for-unity/issues/3318#issuecomment-3220781593
Still not fixed in 2.1.0, I have to include Android platform on gpgs-plugin-support-2.1.0.aar file every time before building a game.
— Reply to this email directly, view it on GitHub https://github.com/playgameservices/play-games-plugin-for-unity/issues/3318#issuecomment-3220781593, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX2VHGTKONUYDBNYIRHQ3L3PMVFLAVCNFSM6AAAAABP6ACYLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMRQG44DCNJZGM . You are receiving this because you commented.Message ID: <playgameservices/play-games-plugin-for-unity/issues/3318/3220781593@ github.com>
[Solution]
If all above attempts didn't worked for you, here is the final solution (probably :stuck_out_tongue_winking_eye: ) to end your suffering. Please follow the following steps.
Step1: Goto Assets>External Dependency Manager>Android Resolver>Settings
Step2: In Android Resolver Settings scroll down to where you see "Browse" button to select "Local Maven Repo Directory". You will see a path written in the input field as "Assets/GeneratedLocalRepo". Simply change it to "Assets".
(Reference Images attached below)
Step3: Goto Assets>External Dependency Manager>Android Resolver>Delete Resolved Libraries
Step4: Goto Assets>External Dependency Manager>Android Resolver>Force Resolve
Doing this will automatically create "gpgs-plugin-support-x.x.x.aar" and "gpgs-plugin-support-x.x.x.pom"under Assets/GooglePlayGames instead of Assets/GeneratedLocalRepo/GooglePlayGames/
Make a build and test!
----------- Reference Images -----------