File C:\Users\Bekon.android\repositories.cfg could not be loaded.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused,
use —status for details
Configure project :launcher WARNING: The option ‘android.enableR8’ is deprecated and should not be used anymore. It will be removed in a
future version of the Android Gradle plugin, and will no longer allow
you to disable R8.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong: Execution failed for task ‘:unityLibrary:compileReleaseLibraryResources’.
Could not resolve all files for configuration ‘:unityLibrary:_internal_aapt2_binary’.
Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
Required by:
project :unityLibrary
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Network is unreachable: connect
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> jcenter.bintray.com
- 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.
==============================================================================
2: Task failed with an exception.
- What went wrong: Execution failed for task ‘:launcher:mergeReleaseResources’.
Could not resolve all files for configuration ‘:launcher:_internal_aapt2_binary’.
Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
Required by:
project :launcher
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Network is unreachable: connect
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> jcenter.bintray.com
-
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 30s Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
CommandInvokationFailure: Gradle build failed.
F:\Unity\2020.3.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe
-classpath «F:\Unity\2020.3.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.6.4.jar»
org.gradle.launcher.GradleMain «-Dorg.gradle.jvmargs=-Xmx8000m»
«assembleRelease»
stderr[
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong: Execution failed for task ‘:unityLibrary:compileReleaseLibraryResources’.
Could not resolve all files for configuration ‘:unityLibrary:_internal_aapt2_binary’.
Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
Required by:
project :unityLibrary
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Network is unreachable: connect
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> jcenter.bintray.com
- 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.
==============================================================================
2: Task failed with an exception.
- What went wrong: Execution failed for task ‘:launcher:mergeReleaseResources’.
Could not resolve all files for configuration ‘:launcher:_internal_aapt2_binary’.
Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
Required by:
project :launcher
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Network is unreachable: connect
> Could not resolve com.android.tools.build:aapt2:3.6.0-6040484.
> Could not get resource ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/aapt2/3.6.0-6040484/aapt2-3.6.0-6040484.pom’.
> jcenter.bintray.com
-
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 30s Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
] stdout[ Starting a Gradle Daemon, 1 incompatible Daemon could not be
reused, use —status for details
Configure project :launcher WARNING: The option ‘android.enableR8’ is deprecated and should not be used anymore. It will be removed in a
future version of the Android Gradle plugin, and will no longer allow
you to disable R8.
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseBuildConfig
Task :launcher:generateReleaseBuildConfig
Task :launcher:compileReleaseAidl NO-SOURCE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :unityLibrary:generateReleaseResValues
Task :unityLibrary:generateReleaseResources
Task :launcher:mainApkListPersistenceRelease
Task :launcher:generateReleaseResValues
Task :launcher:generateReleaseResources
Task :launcher:createReleaseCompatibleScreenManifests
Task :launcher:extractDeepLinksRelease
Task :launcher:prepareLintJar
Task :launcher:checkReleaseDuplicateClasses
Task :unityLibrary:packageReleaseResources
Task :unityLibrary:parseReleaseLocalResources
Task :unityLibrary:javaPreCompileRelease
Task :unityLibrary:extractDeepLinksRelease
Task :unityLibrary:compileReleaseLibraryResources FAILED
Task :launcher:mergeReleaseResources FAILED
Task :launcher:desugarReleaseFileDependencies
Task :unityLibrary:processReleaseManifest 17 actionable tasks: 17 executed ] exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun
(UnityEditor.Utils.Program p,
UnityEditor.Android.Command+WaitingForProcessToExit
waitingForProcessToExit, System.String errorMsg) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0) UnityEditor.Android.Command.Run
(System.Diagnostics.ProcessStartInfo psi,
UnityEditor.Android.Command+WaitingForProcessToExit
waitingForProcessToExit, System.String errorMsg) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0) UnityEditor.Android.Command.Run
(System.String command, System.String args, System.String workingdir,
UnityEditor.Android.Command+WaitingForProcessToExit
waitingForProcessToExit, System.String errorMsg) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args,
System.String workingdir, System.Action1[T] progress, System.String error) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action
1[T] progress) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>: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
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute
(UnityEditor.Android.PostProcessor.PostProcessorContext context) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks
(UnityEditor.Android.PostProcessor.PostProcessorContext context) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>: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
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks
(UnityEditor.Android.PostProcessor.PostProcessorContext context) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>: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
<2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess
(UnityEditor.Modules.BuildPostProcessArgs args,
UnityEditor.BuildProperties& outProperties) (at
<2c6e9a95f1dd4e06ad71afcd2684dcb7>: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
:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Build completed with a result of ‘Failed’ in 125 seconds (124840 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors at
UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer
(UnityEditor.BuildPlayerOptions options) [0x002ca] in
:0 at
UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean
askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions)
[0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Всего 4 ошибки
1)
FAILURE: Build failed with an exception.
* Where:
Build file ‘C:\Users\sobol\OneDrive\Рабочий стол\unity\clicker.v4\Temp\gradleOut\launcher\build.gradle’ line: 3* What went wrong:
A problem occurred evaluating project ‘:launcher’.
> Failed to apply plugin [id ‘com.android.internal.application’]
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See b.android.com/95744 for details. This warning can be disabled by adding the line ‘android.overridePathCheck=true’ to gradle.properties file in the project directory.* 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 1s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
2)
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2020.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath «C:\Program Files\Unity\Hub\Editor\2020.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.6.4.jar» org.gradle.launcher.GradleMain «-Dorg.gradle.jvmargs=-Xmx4096m» «assembleRelease»stderr[
FAILURE: Build failed with an exception.
* Where:
Build file ‘C:\Users\sobol\OneDrive\Рабочий стол\unity\clicker.v4\Temp\gradleOut\launcher\build.gradle’ line: 3* What went wrong:
A problem occurred evaluating project ‘:launcher’.
> Failed to apply plugin [id ‘com.android.internal.application’]
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See b.android.com/95744 for details. This warning can be disabled by adding the line ‘android.overridePathCheck=true’ to gradle.properties file in the project directory.* 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 1s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <1f5aacfb83804e518b48285b5fe58926>: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 <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1f5aacfb83804e518b48285b5fe58926>: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 <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1f5aacfb83804e518b48285b5fe58926>: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 <1f5aacfb83804e518b48285b5fe58926>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1f5aacfb83804e518b48285b5fe58926>: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 <25e9afc147634a5ca855ab83fab425dd>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
3)
Build completed with a result of ‘Failed’ in 25 seconds (24999 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
4)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <25e9afc147634a5ca855ab83fab425dd>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <25e9afc147634a5ca855ab83fab425dd>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
У меня присутствуют 2 скрипта, основной и для звуков
основной скрипт
https://pastebin.com/sMAuicqi
Скрипт для звуков
https://pastebin.com/qpZc2hQ6
1)
2)
3)
Если я что то не то расписал или что то было лишним, то заранее извините все кто хочет помочь, в первые задаю вопрос на форуме.
и если вдруг нужна еще какая то информация, то пишите, предоставлю все что требуется, лишь бы решить проблему
1 / 1 / 0 Регистрация: 26.09.2018 Сообщений: 32 |
|
1 |
|
15.05.2019, 21:41. Показов 8181. Ответов 8
Я обновил юнити до версии unity 2019.1.2f1 и как всегда ничего хорошего из этого не вышло. При компиляции apk выводит ошибку: Gradle build failed. See the Console for details. Переустановка, обновление и понижение версий JDK и SDK не помогло. Так же пробовал переустановить юнити, тоже не помогло. Миниатюры
0 |
3337 / 1760 / 1018 Регистрация: 26.10.2018 Сообщений: 5,169 |
|
15.05.2019, 21:44 |
2 |
Ошибка легко гуглится, также как и решение.
0 |
1 / 1 / 0 Регистрация: 26.09.2018 Сообщений: 32 |
|
15.05.2019, 21:45 [ТС] |
3 |
Я искал решение, пробовал много способов, лазил по форумам, так ничего и не помогло.
0 |
3337 / 1760 / 1018 Регистрация: 26.10.2018 Сообщений: 5,169 |
|
15.05.2019, 21:46 |
4 |
То есть смена с gradle на internal не помогает?
0 |
1 / 1 / 0 Регистрация: 26.09.2018 Сообщений: 32 |
|
15.05.2019, 21:47 [ТС] |
5 |
В этой версии юнити убрали это. Поэтому и не получается.
0 |
3337 / 1760 / 1018 Регистрация: 26.10.2018 Сообщений: 5,169 |
|
15.05.2019, 21:57 |
6 |
Android: Removed the internal build system Боже мой, и правда))
0 |
1 / 1 / 0 Регистрация: 26.09.2018 Сообщений: 32 |
|
15.05.2019, 22:05 [ТС] |
7 |
Там немного другая ошибка. У меня с SDK и JDK все нормально.
0 |
3337 / 1760 / 1018 Регистрация: 26.10.2018 Сообщений: 5,169 |
|
15.05.2019, 22:11 |
8 |
Сообщение было отмечено Selkon как решение РешениеТам еще пишет что путь к проекту содержит не английские символы, может из-за этого, но вряд ли конечно.
0 |
1 / 1 / 0 Регистрация: 26.09.2018 Сообщений: 32 |
|
15.05.2019, 22:12 [ТС] |
9 |
Я нашел решение этой ошибки. Я просто перенес папку с проектом в другое место и все заработало, ну почти, но это уже другая ошибка.
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
15.05.2019, 22:12 |
9 |
Solution 1:[1]
I had a similar issue. I found I had enabled the built-in ads extensions option in the ads section of services alongside also having the ads package installed. Uninstalling the ads package in the package manager did the job for me
Solution 2:[2]
it happened to me and I just solve it by commenting-out the unity-ads on gradle dependencies just like that:
//implementation(name: 'unity-ads', ext:'aar')
Solution 3:[3]
I just solved it, basically, the error started when I added the ads Assets from the assets store.
what I didn’t know that I Had one installed from the package manager there for it was duplicate
what you should do is to delete the package from the package manager, because if you delete the folders that were downloaded from the asset store you can’t implement the listener in your script.
Solution 4:[4]
I fixed it by going to Assets > Play Services Resolver > Android Resolver > Delete Resolved Libraries
Solution 5:[5]
I’ve fixed that issue by deleting the playcore.arr file from the Assets/GooglePlayPlugins/com.google.play.core/Runtime/Plugins folder
Issue
All of a sudden, Gradle fails to build and throws the following error:
CommandInvokationFailure: Gradle build failed.
D:\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath «D:\Unity\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.unity3d.ads.BuildConfig
FAILURE: Build failed with an exception.
-
What went wrong:
Execution failed for task ‘:transformDexArchiveWithExternalLibsDexMergerForRelease’.com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\0.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\1.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\2.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\3.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\4.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\5.jar, D:\Unity
Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\6.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\7.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\8.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\9.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\10.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\11.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\12.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\13.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\14.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\15.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\16.jar, D:\Unity Projects\VegOrNonVeg\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\17.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.
I’ve tried uninstalling the existing SDK and reinstalled SDK for Oreo
I’m also getting the following error:
UnityAdsEditor: Initialize(3113808, False);
UnityEditor.Advertisements.UnityAdsEditor:EditorOnLoad()
The project had no issues before. No new update or any code changes.
Solution
Issue Resolved:
The existing package for Unity Ads was causing this problem.
Go to Package Manager and Remove/Update the Advertisement package (Mine was 2.0.8, updated it to 3.0.3).
Go to Edit > Project Settings > Player and select .NET 4.x Equivalent for the Scripting Runtime Version under Configuration.
If possible choose Minimum API Level as 19 or above.
Make sure to delete the existing Unity Ads folder if present in the Assets Folder of the Project window.
Answered By — Kshitij Dhar