Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Updated to most recent Unity, and getting Gradle errors when building now

Discussion in 'Android' started by Nano_95, Aug 31, 2019.

  1. Nano_95

    Nano_95

    Joined:
    Dec 25, 2017
    Posts:
    7
    Hi everybody,

    I just updated to the most recent Unity, and also just downloaded Unity Hub. Through it, i installed the most recent Unity... 2019.2.3f1. I also installed the android package, including the NDK and SDK stuff. But, now when I try to build my projects... there is an error when it's at the end finalizing things with the Gradle :(

    What seems to be most important out of the big pile of vomit that is spewed at my by the console, this is what seems important:

    ----------------


    BUILD FAILED WITH AN EXCEPTION
    ...
    ...
    ...
    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

    ----------------

    Would anyone be able to push me in the right direction on how to solve this?
    Thank you!
     
  2. echtsang

    echtsang

    Joined:
    Oct 20, 2018
    Posts:
    3
    I solved this by unchecking the use custom gradle template option. This is in Project Settings > Player > Build > Custom Gradle Template. This is because I had upgraded my unity version and to get it to work I needed a custom gradle file, which had set the gradle plugin version to "classpath 'com.android.tools.build:gradle:3.0.1'", but it needed a higher version. Once I unchecked the use custom gradle template option, the generated "Temp/gradleOut/build.gradle" file set the plugin version to 3.4.0 and it fixed the problem.