CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “bundleRelease”
stderr[
D8: Program type already present: com.facebook.unity.Constants
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:transformDexArchiveWithExternalLibsDexMergerForRelease’.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\0.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\1.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\2.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\3.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\6.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\7.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\8.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\9.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\10.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\11.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\12.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\13.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\14.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\15.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\16.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\17.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\18.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\19.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\20.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\21.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\22.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\23.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\24.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\25.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\26.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\27.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\28.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\29.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\30.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\31.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\32.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\33.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\35.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\36.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\37.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\38.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\39.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\40.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\41.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\42.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\43.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\44.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\45.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\46.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\47.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\48.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\49.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\50.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\51.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\52.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\53.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\54.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\55.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\56.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\57.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\58.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\59.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\60.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\61.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\62.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\63.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\64.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\65.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\66.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\67.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\68.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\69.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\70.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\71.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\72.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\73.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\74.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\75.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\76.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\77.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\78.jar, C:\Users\mypc\Documents\mygame\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\79.jar
Learn how to resolve the issue at Menambahkan dependensi build | Android Studio | Android Developers.
Program type already present: com.facebook.unity.Constants
BU?LD FAILED in 48s
]
stdout[
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\28.0.3\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-28\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
:checkReleaseClasspath UP-TO-DATE
:preBuild UP-TO-DATE
:GoogleMobileAdsPlugin:preBuild UP-TO-DATE
:GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE
:GoogleMobileAdsPlugin:checkReleaseManifest
:GoogleMobileAdsPlugin:processReleaseManifest
:preReleaseBuild UP-TO-DATE
:GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:GoogleMobileAdsPlugin:compileReleaseRenderscript
:GoogleMobileAdsPlugin:generateReleaseResValues
:GoogleMobileAdsPlugin:generateReleaseResources
:GoogleMobileAdsPlugin:packageReleaseResources
:mergeReleaseResources UP-TO-DATE
:checkReleaseManifest UP-TO-DATE
:createReleaseCompatibleScreenManifests UP-TO-DATE
:mainApkListPersistenceRelease UP-TO-DATE
:processReleaseManifest
:bundleReleaseResources
warn: removing resource com.narcade.mygame1:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
:mergeReleaseShaders UP-TO-DATE
:compileReleaseShaders UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:GoogleMobileAdsPlugin:mergeReleaseShaders
:GoogleMobileAdsPlugin:compileReleaseShaders
:GoogleMobileAdsPlugin:generateReleaseAssets
:GoogleMobileAdsPlugin:packageReleaseAssets
:mergeReleaseAssets
:GoogleMobileAdsPlugin:compileReleaseAidl NO-SOURCE
:compileReleaseAidl NO-SOURCE
:generateReleaseBuildConfig UP-TO-DATE
:prepareLintJar UP-TO-DATE
:splitsDiscoveryTaskRelease UP-TO-DATE
:GoogleMobileAdsPlugin:generateReleaseRFile
:processReleaseResources
warn: removing resource com.narcade.mygame1:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
:generateReleaseSources
:GoogleMobileAdsPlugin:generateReleaseBuildConfig
:GoogleMobileAdsPlugin:prepareLintJar UP-TO-DATE
:GoogleMobileAdsPlugin:generateReleaseSources
:GoogleMobileAdsPlugin:javaPreCompileRelease
:GoogleMobileAdsPlugin:compileReleaseJavaWithJavac
:GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE
:GoogleMobileAdsPlugin:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
:javaPreCompileRelease UP-TO-DATE
:compileReleaseJavaWithJavac UP-TO-DATE
:transformClassesWithDexBuilderForRelease UP-TO-DATE
:transformDexArchiveWithExternalLibsDexMergerForRelease FAILED
35 actionable tasks: 18 executed, 17 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action
1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
Rethrow as BuildFailedException: Exception of type ‘UnityEditor.Build.BuildFailedException’ was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <177bc8179be6497489c4b5b319f290d7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)