- Home /
Question by
DawdleDev · Mar 10, 2019 at 02:09 AM ·
androiderrorbuildbuild-errorandroid build
Android Build Error
I've been struggling all day trying to figure out what these error logs mean, to no avail. These appear every time I try to build the game to Android.
Error 1/3
System.ComponentModel.Win32Exception (0x80004005): ApplicationName='C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Library\PackageCache\com.unity.burst@0.2.4-preview.50\.Runtime\bcl.exe', CommandLine='--debug=true @C:\Users\Shawn\AppData\Local\Temp\tmp73a051c0.tmp', CurrentDirectory='C:/Users/Shawn/Desktop/Koala's stuff/Unity/Projects/Chunk of Space/Assets/..', Native error= The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <3845a180c26b4889bc2d47593a665814>:0
at System.Diagnostics.Process.Start () [0x0003a] in <3845a180c26b4889bc2d47593a665814>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) [0x0006b] in C:\buildslave\unity\build\Editor\Mono\Utils\Program.cs:44
at UnityEditor.Utils.Program.Start () [0x00003] in C:\buildslave\unity\build\Editor\Mono\Utils\Program.cs:28
at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0001d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:106
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:73
at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) [0x0062f] in C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Library\PackageCache\com.unity.burst@0.2.4-preview.50\Editor\BurstAotCompiler.cs:325
UnityEngine.Debug:LogError(Object)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.50/Editor/BurstAotCompiler.cs:329)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error 2/3
System.ComponentModel.Win32Exception (0x80004005): ApplicationName='C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Library\PackageCache\com.unity.burst@0.2.4-preview.50\.Runtime\bcl.exe', CommandLine='--debug=true @C:\Users\Shawn\AppData\Local\Temp\tmpc9c2206.tmp', CurrentDirectory='C:/Users/Shawn/Desktop/Koala's stuff/Unity/Projects/Chunk of Space/Assets/..', Native error= The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <3845a180c26b4889bc2d47593a665814>:0
at System.Diagnostics.Process.Start () [0x0003a] in <3845a180c26b4889bc2d47593a665814>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at UnityEditor.Utils.Program.Start (System.EventHandler exitCallback) [0x0006b] in C:\buildslave\unity\build\Editor\Mono\Utils\Program.cs:44
at UnityEditor.Utils.Program.Start () [0x00003] in C:\buildslave\unity\build\Editor\Mono\Utils\Program.cs:28
at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x0001d] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:106
at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00063] in C:\buildslave\unity\build\Editor\Mono\BuildPipeline\BuildUtils.cs:73
at Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) [0x0062f] in C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Library\PackageCache\com.unity.burst@0.2.4-preview.50\Editor\BurstAotCompiler.cs:325
UnityEngine.Debug:LogError(Object)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs(BuildReport) (at Library/PackageCache/com.unity.burst@0.2.4-preview.50/Editor/BurstAotCompiler.cs:329)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error 3/3
CommandInvokationFailure: Gradle build failed.
A:\Ignore Backup\Applications\Unity\Hub\Editor\2018.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "A:\Ignore Backup\Applications\Unity\Hub\Editor\2018.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
stderr[
D8: Program type already present: com.unity3d.ads.BuildConfig
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\0.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\1.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\2.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\3.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\4.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\5.jar, C:\Users\Shawn\Desktop\Koala's stuff\Unity\Projects\Chunk of Space\Temp\gradleOut\build\intermediates\transforms\dexBuilder\debug\6.jar
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.unity3d.ads.BuildConfig
* 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 29s
]
stdout[
:checkDebugClasspath
:preBuild UP-TO-DATE
:preDebugBuild
:compileDebugAidl NO-SOURCE
:compileDebugRenderscript
:checkDebugManifest
:generateDebugBuildConfig
:prepareLintJar
:mainApkListPersistenceDebug
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:createDebugCompatibleScreenManifests
:processDebugManifest
:splitsDiscoveryTaskDebug
:processDebugResources
:generateDebugSources
:javaPreCompileDebug
:compileDebugJavaWithJavac
:compileDebugNdk NO-SOURCE
:compileDebugSources
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:transformClassesWithDexBuilderForDebug
:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
20 actionable tasks: 20 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <76abbd884b37447da464288ec1125ab8>: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 <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <76abbd884b37447da464288ec1125ab8>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
JDK, Android SDK, and Unity (2018.3) are all up to date. Any and all help is much appreciated!
Comment
Answer by DawdleDev · Mar 11, 2019 at 05:25 PM
I found the solution. Basically, I deleted the Android and iOS folders under Plugins. Apparently they were causing conflicts with the rest of the Ads stuff.