googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.28k stars 346 forks source link

[Bug] EDM4U 1.2.183: Error occurs in GooglePlayGamesPlugin #716

Open crSudo opened 1 day ago

crSudo commented 1 day ago

[REQUIRED] Please fill in the following fields:

[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%

google-oss-bot commented 1 day ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

crSudo commented 1 day ago

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 commented 18 hours ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.

The title was left blank so we added it. Is there anything else that doesn't follow the template?

StefanMilkov commented 15 hours ago

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") }