Error when building .apk to android.
I'm getting this error each time I build an .apk. ..........
" CommandInvokationFailure: Gradle build failed. C:\Program Files\2018.4.2f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\2018.4.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[ D8: Program type already present: com.unity.udp.sdk.ActivityExtension
FAILURE: Build failed with an exception.
-
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\0.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\1.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\2.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\3.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\4.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\5.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\6.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\7.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\8.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\9.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\10.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\11.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\12.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\13.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\14.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\15.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\16.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\19.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\20.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\21.jar, C:\Users\Jacks\Desktop\Genius Files\Unity Games\Springy Cat\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\22.jar
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 25s ] stdout[ :checkReleaseClasspath UP-TO-DATE :preBuild UP-TO-DATE :preReleaseBuild UP-TO-DATE :compileReleaseAidl NO-SOURCE :compileReleaseRenderscript :checkReleaseManifest UP-TO-DATE :generateReleaseBuildConfig UP-TO-DATE :prepareLintJar UP-TO-DATE :mainApkListPersistenceRelease UP-TO-DATE :generateReleaseResValues UP-TO-DATE :generateReleaseResources :mergeReleaseResources UP-TO-DATE :createReleaseCompatibleScreenManifests UP-TO-DATE :processReleaseManifest :splitsDiscoveryTaskRelease UP-TO-DATE :processReleaseResources :generateReleaseSources :javaPreCompileRelease UP-TO-DATE :compileReleaseJavaWithJavac UP-TO-DATE :compileReleaseNdk NO-SOURCE :compileReleaseSources UP-TO-DATE :lintVitalRelease :mergeReleaseShaders UP-TO-DATE :compileReleaseShaders UP-TO-DATE :generateReleaseAssets UP-TO-DATE :mergeReleaseAssets :transformClassesWithDexBuilderForRelease UP-TO-DATE :transformDexArchiveWithExternalLibsDexMergerForRelease FAILED 21 actionable tasks: 6 executed, 15 up-to-date ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0) UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at :0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at :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 :0) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"
what is going on?
Your answer
Follow this Question
Related Questions
Apk build and install problem 0 Answers
why android app after building is not working on physical device? 1 Answer
Building APK is taking an absurdly long amount of time 3 Answers
"com.google.common.base.verifyexception" Can't build my android game 0 Answers
Is anyone else having problems with gvr responding to phone movement android? 1 Answer