Gradle build failed when i build apk with unity 2018.4.5f1

Hi Boys, Help me

SDK api 28
JDK 1.8.0_212
NDK r16

there are all error messages
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_212\bin\java.exe -classpath “D:\2018.4.5\Unity\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 root project ‘gradleOut’.

Failed to notify project evaluation listener.
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V

  • 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 15s
]
thanks
Ali

Did you enable a custom gradle template in your android preferences in Player Settings? If so, what is the version of your com.android.tools.build:gradle:X.X.X dependency?

1 Like

Hi same here i updated from unity 2018.3.5 to 2018.4.10 and got the same issue on build creation.
I have enabled custom gradle and version is : classpath ‘com.android.tools.build:gradle:3.0.1’

Any fixes ?
Thanks