[Bug] AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.Games
rico345100 opened this issue · 2 comments
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3.43f1
- External Dependency Manager version: 1.2.182
- Source you installed EDM4U: .unitypackage
- Features in External Dependency Manager in use: Android Resolver
- Plugins SDK in use: Play Games for Unity 0.10.14, Unity Ads 4.4.2, Unity IAP 4.12.2
- Platform you are using the Unity editor on: Windows
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Please answer the following, if applicable:
What's the issue repro rate? (eg 100%, 1/5 etc)
Me and all my testers reported the same issue.
What happened? How can we make the problem occur?
After setting target API level to 34, only Android 14 users crashed with this error message:
No pending exception expected: java.lang.SecurityException: me.modernator.extinctionob: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
This was caused from Unity's fault and they told me to update Unity at least 2021.3.43f1, so I did.
And also I updated EDM4U to the latest version, but now stuck in the infinite loading in the authentication step, so tried force resolve and it worked, but google rejects the update with this:
Update your com.google.android.play:core:1.10.3 Maven dependency to an Android 14 compatible version! Your current com.google.android.play:core:1.10.3 library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers. As a reminder, from August 31, 2024, Google Play requires all new app releases to target Android 14. Update to the latest library version dependency to avoid app crashes.
When I launched my game, stuck in the authentication with this error:
09-07 03:24:57.124: E/Unity(5469): AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.Games
09-07 03:24:57.124: E/Unity(5469): java.lang.ClassNotFoundException: com.google.android.gms.games.Games
09-07 03:24:57.124: E/Unity(5469): at java.lang.Class.classForName(Native Method)
09-07 03:24:57.124: E/Unity(5469): at java.lang.Class.forName(Class.java:453)
09-07 03:24:57.124: E/Unity(5469): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
09-07 03:24:57.124: E/Unity(5469): at com.unity3d.player.UnityPlayer.-$$Nest$mnativeRender(Unknown Source:0)
09-07 03:24:57.124: E/Unity(5469): at com.unity3d.player.UnityPlayer$F$a.handleMessage(Unknown Source:110)
09-07 03:24:57.124: E/Unity(5469): at android.os.Handler.dispatchMessage(Handler.java:101)
09-07 03:24:57.124: E/Unity(5469): at android.os.Looper.loop(Looper.java:164)
09-07 03:24:57.124: E/Unity(5469): at com.unity3d.player.UnityPlayer$F.run(Unknown Source:20)
09-07 03:24:57.124: E/Unity(5469): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.Games" on path: DexPathList[[zip file "/data/app/me.modernator.extinctionob-eW1PxbR2YdSorynCyxq_rA==/base.apk", zip file "/data/app/me.modernator.extinctionob-eW1PxbR2YdSorynCyxq_rA==/split_config.arm64_v8a.apk"],nativeLibraryDirectories=[/data/app/me.modernator.extinctionob-eW1PxbR2YdSorynCyxq_rA==/lib/a
Try "force resolve" and run, authentication passes but when I upload it on Google Play Console, google rejects it with this message:
Update your com.google.android.play:core:1.10.3 Maven dependency to an Android 14 compatible version! Your current com.google.android.play:core:1.10.3 library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers. As a reminder, from August 31, 2024, Google Play requires all new app releases to target Android 14. Update to the latest library version dependency to avoid app crashes.
In brief,
- "No force resolve", delete all custom gradle files and re-enable custom gradle files asked by EDM4U -> Build -> Stuck in the authentication with "ClassNotFoundException", but Google accept the upload
- Try "force resolve", now authentication works but Google reject the update with "Update your com.google.android.play:core:1.10.3 Maven dependency to an Android 14 compatible version! ".
I need help, I'm stuck in here and nothing has been working for a few months.
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Hey @rico345100, thanks for reaching out. It looks like this issue is not related to the ED4MU but something else. I took a look in the Unity forums and found these potential solutions to your issue.
No pending exception expected: java.lang.SecurityException: me.modernator.extinctionob: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
According to this Unity thread.
- Updated all packages and plugins (I also updated Firebase to 12.1.0) - No success.
- Added
android:exported="true"to my AndroidManifest.xml under com.unity3d.player.UnityPlayerActivity, because the attribute is now required by Android 14 - No success. - Upgraded Unity Editor from
2021.3.32to2021.3.41- build failure (couldn’t determine success). - Created
settingsTemplate.gradlefile as explained above - this solved the build failure: tested the app and there was no crash.
Update your com.google.android.play:core:1.10.3 Maven dependency to an Android 14 compatible version! Your current com.google.android.play:core:1.10.3 library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers. As a reminder, from August 31, 2024, Google Play requires all new app releases to target Android 14. Update to the latest library version dependency to avoid app crashes.
It looks like the com.google.android.play:core:1.10.3 dependency is deprecated. You likely need to change this according to this Unity thread. You might need to replace this line according to the Android documentations:
e.g.
implementation ‘com.google.android.play:asset-delivery:2.2.2’
implementation ‘com.google.android.play:feature-delivery:2.1.0’
implementation ‘com.google.android.play:review:2.0.1’
implementation ‘com.google.android.play:app-update:2.1.0’
That said, I believe you'll get more specific help by filing in the Unity forums. I'll go ahead and close this thread for now, since it doesn't look like there's any changes we can do in the ED4MU which will help you in this scenario. Thanks!