-
Notifications
You must be signed in to change notification settings - Fork 370
Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2022.3.22f1
- External Dependency Manager version: 1.2.183
- Source you installed EDM4U: GoogleMobileAds-v9.3.0.unitypackage, GooglePlayGamesPlugin-0.11.01.unitypackage (.unitypackage or Unity Package Manager)
- Features in External Dependency Manager in use: Android Resolver (Android Resolver, iOS Resolver, VersionHandler, etc.)
- Plugins SDK in use: AdMob, play-games-plugin (Firebase, Admob, Facebook, etc.)
- Platform you are using the Unity editor on: Windows (Mac, Windows, or Linux)
[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.)
※I am Japanese. I am using a translation site for questions. Please let me know if there is any misunderstanding.
①. Create two new projects in Unity: A-project and B-project.
②. A-project: Import GooglePlayGamesPlugin-0.11.01.unitypackage.
③. B-project: Import GoogleMobileAds-v9.3.0.unitypackage.
④. A-project: Delete ExternalDependencyManager.
⑤. A-project: Copy ExternalDependencyManager from B-project to A-project.
⑥. A-project: Run [Assets]-[External Dependency Manager]-[Android Resolver]-[Resolve].
⑦. A-project: Run [Build Setting]-[Build].
The following error occurs.
Execution failed for task ':launcher:mergeLibDexDebug'.
> Could not resolve all files for configuration ':launcher:debugRuntimeClasspath'.
> Failed to transform classes.jar (project :unityLibrary) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, com.android.build.api.attributes.AgpVersionAttr=7.1.2, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.gradle.internal.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=22, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Could not resolve all files for configuration ':launcher:debugRuntimeClasspath'.
> No variants of com.google.games:gpgs-plugin-support:0.11.01 match the consumer attributes:
- com.google.games:gpgs-plugin-support:0.11.01 configuration runtime:
- Incompatible because this component declares attribute 'artifactType' with value 'srcaar' and the consumer needed attribute 'artifactType' with value 'android-classes-jar'
- Other compatible attributes:
- Doesn't say anything about asm-transformed-variant (required 'NONE')
- Doesn't say anything about dexing-enable-desugaring (required 'true')
- Doesn't say anything about dexing-is-debuggable (required 'true')
- Doesn't say anything about dexing-min-sdk (required '22')
If you look at \Assets\Plugins\Android\settingsTemplate.gradle, you will see the following:
url (unityProjectPath + "/Assets/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
In EDM4U 1.2.179, GeneratedLocalRepo is written in the path.
url "file:///D:/ApplicationUnity_SDK/GooglePlayGamesPlugin/Assets/GeneratedLocalRepo/GooglePlayGames/com.google.play.games/Editor/m2repository" // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
I think the error occurs because GeneratedLocalRepo is not specified. Is that correct?
◇Package download site
https://github.com/googleads/googleads-mobile-unity/releases/tag/v9.3.0
https://github.com/playgameservices/play-games-plugin-for-unity
Please answer the following, if applicable:
What's the issue repro rate? (eg 100%, 1/5 etc)
100%
Activity
google-oss-bot commentedon Oct 30, 2024
This issue does not seem to follow the issue template. Make sure you provide all the required information.
[-][Bug] [/-][+][Bug] EDM4U 1.2.183: Error occurs in GooglePlayGamesPlugin[/+]crSudo commentedon Oct 31, 2024
I fixed it with the following but I get the same error:
\Assets\GooglePlayGames\com.google.play.games\Editor\GooglePlayGamesPluginDependencies.xml
Packages/com.google.play.games/Editor/m2repository
↓
Assets/GooglePlayGames/com.google.play.games/Editor/m2repository
crSudo commentedon Oct 31, 2024
The title was left blank so we added it.
Is there anything else that doesn't follow the template?
StefanMilkov commentedon Oct 31, 2024
WORKAROUND:
I've had the same problem. After EDM Resolve i had to change one path in settingsTemplate.gradle.
From this:
maven {
url (unityProjectPath + "/Assets/GooglePlayGames/Editor/m2repository")
}
To this:
maven {
url (unityProjectPath + "/Assets/GeneratedLocalRepo/GooglePlayGames/Editor/m2repository")
}
JamesKim2998 commentedon Nov 1, 2024
+1
33 remaining items
crSudo commentedon Nov 12, 2024
@argzdev
I verified further. I changed the following line in \Assets\Plugins\Android\settingsTemplate.gradle and it worked correctly.
url (unityProjectPath + "/Assets/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
↓
url (unityProjectPath + "/Assets/GeneratedLocalRepo/GooglePlayGames/com.google.play.games/Editor/m2repository") // Assets/GooglePlayGames/com.google.play.games/Editor/GooglePlayGamesPluginDependencies.xml:11
It seems like the path setting process is the problem, what do you think?
Best Regards
crSudo
argzdev commentedon Nov 15, 2024
I did notice that. However, for me this appears as a warning. Since the path should be detected and corrected by the EDM4U automatically.

This means that the build will still continue even though this warning appears.
Full stacktrace:
It should be detected by this code in the Gradle Resolver.
unity-jar-resolver/source/AndroidResolver/src/GradleResolver.cs
Line 231 in 3e97c8d
There should be no need to manually change the file path. Can you verify if there's only a single version of EDM4U under

Assets > ExternalDependencyManager > Editor
crSudo commentedon Nov 16, 2024
Thank you for your research, @argzdev.
When I set the data in [Resources Definition] in the Unity menu bar [Windows]-[Google Play Games]-[Setup]-[Android setup], GooglePlayGamesPluginDependencies.xml was automatically corrected and the error disappeared.
However, when I run the Sample [Achievements]-[Ach ShowUI], the following error occurs.
The steps are as follows:
[Orther Settings]
[Minimum API Level] : [Android 7.0 API Level 24].
[Scripting Backend] : IL2CPP
[Target Architectures]: Check ARMv64
[Publish Settings]
I set [Project Keystore] and [Project Key].
However, if you manually change the path in \Assets\Plugins\Android\settingsTemplate.gradle as follows, it seems to work correctly.
url (unityProjectPath + "/Assets/GeneratedLocalRepo/GooglePlayGames/com.google.play.games/Editor/m2repository")
Best Regards
crSudo
argzdev commentedon Nov 26, 2024
Yeah, I'm not entirely sure why that's happening. I do see similar issues in the play-games-plugin-for-unity repository, which is resolved by the solution you've provided. Now, I'm not sure if the change has to be done on our EDM4U or in the Play Games Plugin for Unity repository. I'll bring this up to our engineers and see if they have some feedback.
crSudo commentedon Nov 27, 2024
Thank you for your reply, @argzdev .
I understand. Please continue your investigation.
Best Regards
crSudo
harsodakrunal commentedon Dec 5, 2024
Thanks a lot, I fixed the same error with this solution.
sandolkakos commentedon Dec 11, 2024
It took me hours to get my project to work again, and I still don't know exactly what the issue was.
I've removed everything regarding Google Play Games and External Dependency Manager, and added again manually using the package:
GooglePlayGamesPlugin-2.0.0.unitypackage
, and then after resolving all the dependencies, it started working again.crSudo commentedon Jan 9, 2025
Thank you for your reply, @sandolkakos .
I tried GooglePlayGamesPlugin-2.0.0.unitypackage.
As expected, problems occur when updating to external-dependency-manager-1.2.183.
I use [Firebase] and [GoogleMobileAds].
These libraries use external-dependency-manager-1.2.183, so I would like to use the latest version.
GooglePlayGamesPlugin-2.0.0 seems to have fixed the problem with GooglePlayGamesPluginDependencies.xml.
However, external-dependency-manager 1.2.182 is still being used.
Best Regards
crSudo
mikeohuo commentedon Mar 21, 2025
This issue is still persistent with a lot of
.srcaar
's in Unity 6000.0.34f1 @argzdev with EDM4U 1.2.185.With
Use Full Custom Local Maven Repo Path --> Building Android App Through Unity
checked or unchecked, a force resolve with EDM4U will always fail to point to the new location of the unpacked.aar
inGeneratedLocalRepo/<DependencyName>/m2repository....
and instead point to the source repo location where the.srcaar
is located in.This causes the aab/apk to be built without the needed .aar
Examples below for the unchecked
Use Full Custom Local Maven Repo Path --> Building Android App Through Unity
Affected GoogleSignInSupportDependencies.xml:
Resulting snippet in settingsTemplate.gradle:
Functional (Firebase) AnalyticsDependencies.xml:
Resulting snippet in settingsTemplate.gradle:
Do you have any recommended fixes other than needing to manually edit settingsTemplate.gradle each time a Force Resolve happens?
JeffreyLeeExient commentedon Mar 28, 2025
I think the problem with EDM4U 1.283+ placing the wrong path in settingsTemplate.gradle is due to a discrepancy in how path remapping has been implemented in different pats of
GradleTemplateResolver
. The path remapping logic when copying the .srcaar's is different to the logic that's used when writing the settings template.If you look at what was changed in f68ab8a then you'll see that
CopySrcAars
only callsReplaceLocalFolderBasedOnM2repo
ifReplaceBaseAssetsOrPackagesFolder
failed to remap the path. But inGradleMavenReposLinesFromDependencies
,ReplaceLocalFolderBasedOnM2repo
is always called, which can result in the paths being remapped twice, breaking them in the process.E.g. the example which is breaking things for us:
Assets/GooglePlayGames/Editor/m2repository
in its dependencies.xmlReplaceBaseAssetsOrPackagesFolder
will remap that to the correct path ofAssets/GeneratedLocalRepo/GooglePlayGames/Editor/m2repository
ReplaceLocalFolderBasedOnM2repo
will then remap that toAssets/GeneratedLocalRepo/Editor/m2repository
because it strips out everything except the immediate parent of them2repository
folderGradleMavenReposLinesFromDependencies
then goes "wait, that folder doesn't exist!" and resets it back to the original path from the dependencies.xml (Assets/GooglePlayGames/Editor/m2repository
), which is what we're seeing in our settingsTemplateUpdating
GradleMavenReposLinesFromDependencies
to add anif(!repoPath.StartsWith(GooglePlayServices.SettingsDialog.LocalMavenRepoDir)))
check around the call toReplaceLocalFolderBasedOnM2repo
(as perCopySrcAars
) seems like it would fix it.crSudo commentedon Jul 4, 2025
Hello @argzdev.
※Sorry. I'm contacting you here because I haven't received any response to the play-games-plugin-for-unity issue I posted about a different matter.
If you have another way to contact me, please let me know.
It's been about seven months since then.
Has there been any progress since then?
I tried changing the folder structure to the same as Firebase, and it now works properly.
Would you consider doing that?
■Here are the steps:
◇Step 1 : Import process
[Orther Settings]
[Minimum API Level] : [Android 7.0 API Level 24].
[Scripting Backend] : IL2CPP
[Target Architectures]: Check ARMv64
[Publish Settings]
I set [Project Keystore] and [Project Key].
◇Step 2 : Modify the source
Move all files in Assets\GooglePlayGames\com.google.play.games to Assets\GooglePlayGames.
Delete the empty Assets\GooglePlayGames\com.google.play.games folder.
Move Assets\GooglePlayGames\Editor\m2repository to Assets\GooglePlayGames.
Open \Assets\GooglePlayGames\Editor\GooglePlayGamesPluginDependencies.xml in a text editor and change the following:
Assets/GooglePlayGames/com.google.play.games/Editor/m2repository
↓
Assets/GooglePlayGames/m2repository
Open \Assets\GooglePlayGames\Editor\GooglePlayGamesPlugin_v2.0.0.txt in a text editor and change the following:
Delete com.google.play.games.
For example:
Assets/GooglePlayGames/com.google.play.games/Runtime/Google.Play.Games.asmdef
↓
Assets/GooglePlayGames/Runtime/Google.Play.Games.asmdef
Open \Assets\GooglePlayGames\Editor\GPGSUtil.cs in a text editor and change the following:
private const string RootFolderName = "com.google.play.games";
↓
private const string RootFolderName = "GooglePlayGames";
◇Step 3 : Build
Best Regards
crSudo
sandolkakos commentedon Jul 4, 2025
hey @crSudo, since my last post I've not updated my project with newer
GooglePlayGamesPlugin
orExternal Dependency Manager
version since the version I'm using was always doing what I needed.Do you just want to know if your steps will work fine on my environment?
crSudo commentedon Jul 7, 2025
Sorry @sandolkakos. I misspelled your name. I've corrected it.