Closed Plyrni closed 1 week ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
I recently started a new project, and my setup is nearly identical to this. Running into the exact same issue.
Unity Version: 2022.3.45f1 EDM Version: 1.2.169 (included in latest Google Play Games plugin)
I'm still stuck on it
Hey folks, thanks for reaching out. So far I'm unable to reproduce the same behavior. Here's what I did:
2022.3.47f1
and use Android platformAssets > Import Package > Custom Package..
add EDM4U
1.2.183Assets > Import Package > Custom Package..
add GooglePlayGamesPlugin-0.11.01.unitypackage
1.2.169
from GooglePlayGamesPlugin
Window > Package Manager > Add package by name
add com.unity.purchasing
version 4.12.2
1.2.169
is shownResolve
and Force Resolve
The stacktrace seems to point to an issue with the AGP version. Could you try updating your Minimum API level
to 24
and your Target API level
to 34
and higher?
Quick update on my end, I tried similar steps to what @argzdev listed. The exact details are below:
At this point I ran into a different error, but I was able to resolve the error following this post: https://discussions.unity.com/t/build-failing-with-google-play-services-plugin-could-not-find-com-google-games0-11-01/319041/4
I've now successfully built my apk!
My play games authentication still fails, but that should be a completely different issue.
Issue still here on my side
Move to Min API 24 and target Highest possible API
Removed EDM4U 1.2.183
Installed back EDM4U 1.2.183 (via registry, but it should be the same)
Imported GPGP 0.11.01 again via unityPackage ∟ No error, no replacement of any sort during process. Unlike you guys
Resolve and build succesfull
Installed Unity Purchasing 4.12.2 ∟ No errors after install
Resolve and Force resolve successful
Build failed ∟ Execution failed for task ':launcher:checkDebugDuplicateClasses'.
Enable Custom Main Gradle Template to fix the duplicates manualy
Resolve and Force resolve fail ∟ The same error I mentionned above : NullReferenceException: Object reference not set to an instance of an object Google.JarResolver.Dependency.IsGreater (System.String version1, System.String version2)...
OK, I finally did it! Apparently the issue was UPM registry
Interesting, so I guess the underlying issue is having redundant dependencies or sub-dependencies on both UPM and Custom Package which the EDM4U cannot resolve correctly. Thank you for sharing your updates, @txukiakari, @Plyrni. I'm sure this'll help guide other folks who encounter this issue as well. That said, since the issue has been resolved. I'll go ahead and close this thread.
### [REQUIRED] Please fill in the following fields:
### [REQUIRED] Please describe the issue here: Steps to reproduce bug :
1 - Make new project ∟ Mine is Unity 2022.3.47f1 URP on Windows 2 - Add GooglePlayGames plugin : https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/current-build 3 - A Warning appear : Non-secure network connections disabled in Player Settings (Followed by an error but we don't care) ∟ Allow it in ProjectSettings -> Player -> Other Settings -> Configuration -> Allow downloads over HTTP 4 - Add EDM4U registry ∟ Name : package.openupm.com ∟ URL : https://package.openupm.com ∟ Scope : com.google.external-dependency-manager 5 - Install EDM4U through Package Manager 6 - Switch project to Android 7 - Popup appear about auto resolution, just Disable (Annoying otherwise) 8 - Force resolve ∟ Conflicting dependency detected ∟ Get stuck at 100%, with no succeed or failed popup 9 - To fix it : Open "GooglePlayGamesPluginDependencies.xml" located in "Assets/GooglePlayGames/com.google.play.games/Editor/" ∟ Replace "Packages/com.google.play.games/Editor/m2repository" with "Assets/GooglePlayGames/com.google.play.games/Editor/m2repository" 10 - Force resolve doesn't work at this point, so close the editor and open it again 11 - Delete resolved libraries 12 - Force resolve ∟ Resolve succeed 13 - Build APK (I'm using LZ4HC) ∟ Build success 14 - Add Unity package "In App Purchasing" 15 - Delete resolved libraries 16 - Force resolve 17 - Try building ∟ Error : Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
18 - Enable Custom template : (located in Player Settings -> Publishing Settings -> Build ∟ Custom Main Gradle Template ∟ Custom Gradle Properties Template ∟ Custom Gradle Settings Template ∟ Note : I'm not sure we need Properties and Settings to trigger the bug, that's simply what I've done 19 - Delete resolved libraries 20 - Force resolve 21 - There you should have the error :
What's the issue repro rate? 100% repro rate Here is a downloadable project that reproduce the bug : https://we.tl/t-jrlWny5Uzo