facebook twitter hatena line email

「Unity/GooglePlayGames/ver2」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(Androidビルドで"mergeDexRelease"エラーが出る)
(Admin がページ「Unity/GooglePlayGames/v2」を「Unity/GooglePlayGames/ver2」に、リダイレクトを残さずに移動しました)
(相違点なし)

2025年7月8日 (火) 12:15時点における版

Androidビルドで"mergeDexRelease"エラーが出る

エラー詳細

Execution failed for task ':launcher:mergeDexRelease'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
   > 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=release, com.android.build.gradle.internal.attributes.VariantAttr=release, dexing-enable-desugaring=true, dexing-is-debuggable=false, dexing-min-sdk=23, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
         > No variants of com.google.games:gpgs-plugin-support:2.0.0 match the consumer attributes:
             - com.google.games:gpgs-plugin-support:2.0.0 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 'false')
                     - Doesn't say anything about dexing-min-sdk (required '24')

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 3s

対策

  1. Assets/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/2.0.0にある srcaar 拡張子を aar へ
  2. Assets/GooglePlayGames/com.google.play.games/Editor/m2repository/com/google/games/gpgs-plugin-support/2.0.0/gpgs-plugin-support-2.0.0.pom の srcaar を aar へ。

参考:https://www.reddit.com/r/Unity3D/comments/1h4szl0/unity_android_update_sdks_to_use_api_34_and_lots/