Unity 2018.2.14f1 Gradle build failed!

Im trying to build my game in unity using gradle but everytime that i tried i get this error:

pls somebody help out with this

CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_211\bin\java.exe -classpath “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx2048m” “assembleRelease”

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘gradleOut’.

Could not resolve all files for configuration ‘:classpath’.
Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2.
Required by:
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.build:builder:3.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.build:builder:3.0.1 > com.android.tools:sdk-common:26.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.build:builder:3.0.1 > com.android.tools:sdklib:26.0.1 > com.android.tools:repository:26.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-checks:26.0.1 > com.android.tools.lint:lint-api:26.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-checks:26.0.1 > com.android.tools.lint:lint-api:26.0.1 > org.jetbrains.kotlin:kotlin-reflect:1.1.3-2
Could not resolve org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2.
Could not get resource ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom’.
Could not GET ‘https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom’.
jcenter.bintray.com
Could not resolve org.ow2.asm:asm:5.1.
Required by:
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.build:builder:3.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-checks:26.0.1 > com.android.tools.lint:lint-api:26.0.1
Could not resolve org.ow2.asm:asm:5.1.
Could not get resource ‘https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.pom’.
Could not GET ‘https://jcenter.bintray.com/org/ow2/asm/asm/5.1/asm-5.1.pom’.
jcenter.bintray.com
Could not resolve org.ow2.asm:asm-analysis:5.1.
Required by:
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1
project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-checks:26.0.1
Could not resolve org.ow2.asm:asm-analysis:5.1.
Could not get resource ‘https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom’.
Could not GET ‘https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom’.
jcenter.bintray.com

This is just a part of the error’s text bc as i am a new user im just allowed to post up to 10 links

Summary

This text will be hidden

Hi! i am an indie game developer and i am having the same issue whenever i am trying to build using gradle build system using unity 2018.3.1f1. i am still able to to build .apk using Internal(deprecated).

I am getting this error after creating a new project and switching it to android platform from build settings.

Failed getting available Android API levels. Make sure your android sdk tools version is 25 or higher and you have internet connection.
System.Threading.ThreadHelper:ThreadStart()

and when building with gradle

CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath “C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease”

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘gradleOut’.

Failed to find Build Tools revision 29.0.0

  • 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 4s
]
stdout[
File C:\Users\Sameer.android\repositories.cfg could not be loaded.
]
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.Action1[T] progress, System.String error) (at <e1c3953b4cf040ddb1400046b1c34897>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[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)