前提・実現したいこと
UnityにGoogleの指示通り(https://developers.google.com/admob/unity/start?hl=ja)に広告(AdMob)を実装し、再びビルドしようとしたところ、ビルドする際に必ず以下のエラーが発生するようになった。このエラーを解決したい。
発生している問題・エラーメッセージ
ビルドする際にBuild Gradleのローディング時に必ず発生する。
「com.Android.tools.r8.CompliationFailedException:Compliation failed to complete See the Console for details.」
![![イメージ説明](b13eb7735aa44062d52fd8e882f91863.
試したこと
様々なサイトを探して、そのサイトの指示通りにStack TraceやAndroid Manifest.xmlのPackage Nameをいじったりしましたが、Android Studioのためのサイト、英語のサイトが特に多く、明確な答えや解決策は得られず、解決には至りませんでした。もし同じエラーに直面した方、解決策をご存知の方がいらっしゃいましたらこのエラーの解決策を教えていただきたいです。
補足情報(FW/ツールのバージョンなど)
Unity 2019.3.3f1 Personal
一応Console画面のエラーメッセージ全文も載せます。自分は初心者なものでさっぱり内容はわかりませんが、詳しい方の参考になれば幸いです…
CommandInvokationFailure: Gradle build failed. C:\Program Files\Java\jdk1.8.0_241\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.3.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease" stderr[ D8: Program type already present: com.google.android.gms.internal.measurement.zzdu FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':launcher:transformClassesAndResourcesWithR8ForRelease'. > com.android.tools.r8.CompilationFailedException: Compilation failed to complete * 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 24s ] stdout[ > Configure project :launcher WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'. > Configure project :unityLibrary WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'. > Configure project :unityLibrary:GoogleMobileAdsPlugin WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'. > Configure project :unityLibrary:unity-android-resources WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported. The current default is 'true'. > Task :launcher:preBuild UP-TO-DATE > Task :unityLibrary:preBuild UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:preBuild UP-TO-DATE > Task :unityLibrary:unity-android-resources:preBuild UP-TO-DATE > Task :launcher:extractProguardFiles UP-TO-DATE > Task :unityLibrary:unity-android-resources:preReleaseBuild UP-TO-DATE > Task :unityLibrary:preReleaseBuild UP-TO-DATE > Task :unityLibrary:checkReleaseManifest UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE > Task :unityLibrary:unity-android-resources:checkReleaseManifest > Task :unityLibrary:GoogleMobileAdsPlugin:checkReleaseManifest > Task :launcher:prepareLintJar UP-TO-DATE > Task :unityLibrary:processReleaseManifest > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE > Task :unityLibrary:generateReleaseResValues UP-TO-DATE > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE > Task :unityLibrary:compileReleaseShaders UP-TO-DATE > Task :unityLibrary:generateReleaseAssets UP-TO-DATE > Task :unityLibrary:unity-android-resources:processReleaseManifest > Task :unityLibrary:unity-android-resources:packageReleaseRenderscript NO-SOURCE > Task :unityLibrary:unity-android-resources:compileReleaseRenderscript NO-SOURCE > Task :unityLibrary:GoogleMobileAdsPlugin:processReleaseManifest > Task :unityLibrary:GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE > Task :unityLibrary:GoogleMobileAdsPlugin:compileReleaseRenderscript NO-SOURCE > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseResValues > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseResources > Task :unityLibrary:GoogleMobileAdsPlugin:packageReleaseResources > Task :unityLibrary:GoogleMobileAdsPlugin:mergeReleaseShaders > Task :unityLibrary:GoogleMobileAdsPlugin:compileReleaseShaders > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseAssets > Task :unityLibrary:unity-android-resources:generateReleaseResValues > Task :unityLibrary:unity-android-resources:generateReleaseResources > Task :unityLibrary:GoogleMobileAdsPlugin:packageReleaseAssets > Task :unityLibrary:GoogleMobileAdsPlugin:compileReleaseAidl NO-SOURCE > Task :unityLibrary:unity-android-resources:packageReleaseResources > Task :unityLibrary:packageReleaseAssets > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE > Task :unityLibrary:generateReleaseResources UP-TO-DATE > Task :unityLibrary:unity-android-resources:mergeReleaseShaders > Task :unityLibrary:unity-android-resources:compileReleaseShaders > Task :unityLibrary:unity-android-resources:generateReleaseAssets > Task :unityLibrary:unity-android-resources:packageReleaseAssets > Task :unityLibrary:unity-android-resources:compileReleaseAidl NO-SOURCE > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseRFile > Task :unityLibrary:unity-android-resources:generateReleaseRFile > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseBuildConfig > Task :unityLibrary:GoogleMobileAdsPlugin:prepareLintJar UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:generateReleaseSources > Task :unityLibrary:unity-android-resources:generateReleaseBuildConfig > Task :unityLibrary:unity-android-resources:prepareLintJar UP-TO-DATE > Task :unityLibrary:unity-android-resources:generateReleaseSources > Task :unityLibrary:unity-android-resources:javaPreCompileRelease > Task :unityLibrary:GoogleMobileAdsPlugin:javaPreCompileRelease > Task :unityLibrary:packageReleaseResources > Task :unityLibrary:compileReleaseAidl NO-SOURCE > Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE > Task :unityLibrary:unity-android-resources:compileReleaseJavaWithJavac > Task :unityLibrary:GoogleMobileAdsPlugin:compileReleaseJavaWithJavac > Task :unityLibrary:unity-android-resources:bundleLibCompileRelease > Task :unityLibrary:unity-android-resources:processReleaseJavaRes NO-SOURCE > Task :unityLibrary:unity-android-resources:bundleLibResRelease > Task :unityLibrary:GoogleMobileAdsPlugin:bundleLibCompileRelease > Task :unityLibrary:unity-android-resources:bundleLibRuntimeRelease > Task :unityLibrary:GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE > Task :unityLibrary:unity-android-resources:mergeReleaseConsumerProguardFiles UP-TO-DATE > Task :unityLibrary:unity-android-resources:mergeReleaseJniLibFolders > Task :unityLibrary:generateReleaseRFile UP-TO-DATE > Task :unityLibrary:prepareLintJar UP-TO-DATE > Task :unityLibrary:generateReleaseSources UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:bundleLibResRelease > Task :unityLibrary:GoogleMobileAdsPlugin:bundleLibRuntimeRelease > Task :unityLibrary:GoogleMobileAdsPlugin:mergeReleaseConsumerProguardFiles UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:mergeReleaseJniLibFolders > Task :unityLibrary:unity-android-resources:transformNativeLibsWithMergeJniLibsForRelease > Task :unityLibrary:unity-android-resources:transformNativeLibsWithStripDebugSymbolForRelease > Task :unityLibrary:unity-android-resources:transformNativeLibsWithIntermediateJniLibsForRelease > Task :unityLibrary:GoogleMobileAdsPlugin:transformNativeLibsWithMergeJniLibsForRelease > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE > Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE > Task :unityLibrary:bundleLibCompileRelease UP-TO-DATE > Task :unityLibrary:processReleaseJavaRes NO-SOURCE > Task :unityLibrary:bundleLibResRelease UP-TO-DATE > Task :unityLibrary:bundleLibRuntimeRelease UP-TO-DATE > Task :unityLibrary:mergeReleaseConsumerProguardFiles UP-TO-DATE > Task :unityLibrary:GoogleMobileAdsPlugin:transformNativeLibsWithStripDebugSymbolForRelease > Task :unityLibrary:GoogleMobileAdsPlugin:transformNativeLibsWithIntermediateJniLibsForRelease > Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE > Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE > Task :launcher:preReleaseBuild > Task :unityLibrary:transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE > Task :launcher:compileReleaseRenderscript NO-SOURCE > Task :unityLibrary:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE > Task :launcher:generateReleaseResValues UP-TO-DATE > Task :launcher:generateReleaseResources UP-TO-DATE > Task :launcher:mergeReleaseResources > Task :launcher:checkReleaseManifest UP-TO-DATE > Task :launcher:createReleaseCompatibleScreenManifests > Task :launcher:mainApkListPersistenceRelease UP-TO-DATE > Task :launcher:processReleaseManifest > Task :launcher:bundleReleaseResources > Task :launcher:mergeReleaseShaders UP-TO-DATE > Task :launcher:compileReleaseShaders UP-TO-DATE > Task :launcher:generateReleaseAssets UP-TO-DATE > Task :launcher:mergeReleaseAssets > Task :launcher:compileReleaseAidl NO-SOURCE > Task :launcher:generateReleaseBuildConfig UP-TO-DATE > Task :launcher:generateReleaseSources UP-TO-DATE > Task :launcher:javaPreCompileRelease UP-TO-DATE > Task :launcher:processReleaseResources > Task :launcher:compileReleaseJavaWithJavac UP-TO-DATE > Task :launcher:processReleaseJavaRes NO-SOURCE > Task :launcher:transformResourcesWithMergeJavaResForRelease UP-TO-DATE > Task :launcher:transformClassesAndResourcesWithR8ForRelease R8 is the new Android code shrinker. If you experience any issues, please file a bug at https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can disable R8 by updating gradle.properties with 'android.enableR8=false'. Current version is: 1.4.77 (build b74371231cb896b02f83285efb055b7c00ff64d8 from go/r8bot (luci-r8-ci-archive-0-eqqf)).
回答2件
あなたの回答
tips
プレビュー