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

ClassNotFoundException com.google.games.bridge.TokenFragment after updating from version 1.2.104 to 1.2.108 #208

Closed
Hauki opened this issue May 6, 2019 · 5 comments

Comments

@Hauki
Copy link

Hauki commented May 6, 2019

ClassNotFoundException happens on startup after updating to 108. It look to be related to that the jar/aar files are now compiled in the gradle file instead of residing in the plugin folder. We tried adding it to our proguard file, but that did not help.

`05-06 11:12:23.436 16323-16386/ W/Unity: !!! [Play Games Plugin DLL] 05/06/19 11:12:23 +02:00 WARNING: Creating new PlayGamesPlatform
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)

05-06 11:12:23.462 16323-16386/ W/Unity: *** [Play Games Plugin DLL] 05/06/19 11:12:23 +02:00 ERROR: Exception launching token request: java.lang.ClassNotFoundException: com.google.games.bridge.TokenFragment
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)

05-06 11:12:23.464 16323-16386/ W/Unity: *** [Play Games Plugin DLL] 05/06/19 11:12:23 +02:00 ERROR: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.google.games.bridge.TokenFragment
java.lang.ClassNotFoundException: com.google.games.bridge.TokenFragment
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at java.lang.Class.forName(Class.java:285)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source)
at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
at android.os.MessageQueue.next(MessageQueue.java:404)
at android.os.Looper.loop(Looper.java:137)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.games.bridge.TokenFragment" on path: DexPathList

`

@sayiliromer
Copy link

We experienced same thing after upgrading from 1.2.104 to 1.2.105

Probably its caused by this changelog (1.2.105)
Android Resolver: If Plugins/Android/mainTemplate.gradle file is present and Gradle is selected as the build type, resolution will simply patch the file with Android dependencies specified by plugins in the project.

We rolled back to 1.2.104 to solve it for now.

@stewartmiles
Copy link
Contributor

@Hauki we've been testing this with Firebase and it seems fine.

Are the Play Games Services AARs being added to the mainTemplate.gradle file?

@Hauki
Copy link
Author

Hauki commented May 7, 2019

Hi,

These were added

// Android Resolver Dependencies Start
compile 'com.android.support.constraint:constraint-layout:1.0.2' // Assets/Editor/ArenaDependencies.xml:150
compile 'com.android.support.constraint:constraint-layout-solver:1.0.2' // Assets/Editor/ArenaDependencies.xml:160
compile 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency(System.Object
compile 'com.android.support:appcompat-v7:27.0.2' // Assets/Editor/ArenaDependencies.xml:68
compile 'com.android.support:appcompat-v7:27.1.1' // Assets/GameAnalytics/Editor/GameAnalyticsDependencies.xml:5
compile 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency(System.Object
compile 'com.android.support:cardview-v7:27.0.2' // Assets/Editor/ArenaDependencies.xml:122
compile 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency(System.Object
compile 'com.android.support:customtabs:27.0.2' // Assets/Editor/ArenaDependencies.xml:104
compile 'com.android.support:recyclerview-v7:27.0.2' // Assets/Editor/ArenaDependencies.xml:140
compile 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency(System.Object
compile 'com.android.support:support-v4:25.3.1+' // UTNotifications.UTNotificationsDependencies.RegisterAndroidDependencies()
compile 'com.android.support:support-vector-drawable:27.0.2' // Assets/Editor/ArenaDependencies.xml:86
compile 'com.crashlytics.sdk.android:crashlytics:2.9.9' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:15
compile 'com.google.android.gms:play-services-ads:15+' // Assets/Editor/ArenaDependencies.xml:34
compile 'com.google.android.gms:play-services-ads-identifier:15.0.1' // Assets/GameAnalytics/Editor/GameAnalyticsDependencies.xml:3
compile 'com.google.android.gms:play-services-appinvite:16.1.1' // Assets/Firebase/Editor/DynamicLinksDependencies.xml:13
compile 'com.google.android.gms:play-services-auth:15.+' // Assets/Editor/ArenaDependencies.xml:55
compile 'com.google.android.gms:play-services-basement:15.0.1' // Assets/GameAnalytics/Editor/GameAnalyticsDependencies.xml:4
compile 'com.google.android.gms:play-services-games:15.+' // Assets/Editor/ArenaDependencies.xml:24
compile 'com.google.android.gms:play-services-gcm:11.8.0+' // UTNotifications.UTNotificationsDependencies.RegisterAndroidDependencies()
compile 'com.google.android.gms:play-services-gcm:15.+' // Assets/Editor/ArenaDependencies.xml:13
compile 'com.google.android.gms:play-services-nearby:15.+' // Assets/Editor/ArenaDependencies.xml:47
compile 'com.google.auto.value:auto-value-annotations:1.6.3' // Assets/Firebase/Editor/AppDependencies.xml:22
compile 'com.google.firebase:firebase-analytics:16.4.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:13
compile 'com.google.firebase:firebase-analytics-unity:5.7.0' // Assets/Firebase/Editor/AnalyticsDependencies.xml:22
compile 'com.google.firebase:firebase-app-unity:5.7.0' // Assets/Firebase/Editor/AppDependencies.xml:20
compile 'com.google.firebase:firebase-common:16.1.0' // Assets/Firebase/Editor/AppDependencies.xml:13
compile 'com.google.firebase:firebase-config:16.5.0' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:13
compile 'com.google.firebase:firebase-config-unity:5.7.0' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:22
compile 'com.google.firebase:firebase-core:16.0.8' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:15
compile 'com.google.firebase:firebase-crashlytics-unity:5.7.0' // Assets/Firebase/Editor/CrashlyticsDependencies.xml:20
compile 'com.google.firebase:firebase-dynamic-links-unity:5.7.0' // Assets/Firebase/Editor/DynamicLinksDependencies.xml:20
compile 'com.google.firebase:firebase-iid:[17.1.2]' // Assets/Firebase/Editor/RemoteConfigDependencies.xml:17
compile 'com.google.games:gpgs-plugin-support:0.9.64' // Assets/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
// Android Resolver Dependencies End

@stewartmiles
Copy link
Contributor

@Hauki thanks for sharing. I discovered that Play Games ships a srcaar file that isn't processed correctly when building with the Gradle template mode.

https://github.com/googlesamples/unity-jar-resolver/raw/v1.2.110/play-services-resolver-1.2.110.0.unitypackage should fix this.

@mmatvein
Copy link

I had the same issue and can confirm updating from 1.2.105 to 1.2.110 fixed the issue. Thanks for the fix!

@googlesamples googlesamples locked and limited conversation to collaborators Nov 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants