P
P
ProgramDevel2020-07-03 15:00:02
Unity
ProgramDevel, 2020-07-03 15:00:02

Graddle build failed in unity?

I can not solve this problem for a month!
Help me please!
When compiling projects for Android, an error occurs Graddle build failed
And these are the errors

FAILURE: Build failed with an exception.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

* What went wrong:

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

A problem occurred configuring project ':launcher'.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

> Could not resolve all artifacts for configuration ':launcher:classpath'.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

> Could not download builder.jar (com.android.tools.build:builder:3.4.0)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

> Could not get resource ' https://dl.google.com/dl/android/maven2/com/androi... '.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

> Tag mismatch!

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

* Try:

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

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.

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

* Get more help at https://help.gradle.org

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

BUILD FAILED in 7s

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

CommandInvokationFailure: Gradle build failed.
D:/Unity/Hub/Editor/2019.3.15f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Unity\Hub\Editor\2019.3.15f1\Editor\Data\PlaybackEngines\ AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
> Could not download builder.jar (com.android.tools.build:builder:3.4.0)
>https://dl.google.com/dl/android/maven2/com/androi... '.
> Tag mismatch!

* 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 7s
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <3167064085404657b0d6c498207da025>: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 <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.Tasks .BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0
)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <3167064085404657b0d6c498207da025>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>: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 <3167064085404657b0d6c498207da025>: 0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs the args, UnityEditor.BuildProperties & outProperties) (AT <3167064085404657b0d6c498207da025>: 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)

Build completed with a result of 'Failed' in 149 seconds (148951 ms)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr )

UnityEditor.BuildPlayerWindow+BuildMethodException: 18 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

PLEASE TELL ME HOW TO SOLVE THE PROBLEM!
IT'S BEEN A MONTH I CAN'T RESOLVE IT!!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question