Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Gradle build failed after update to Unity 2018.3.9f1

Discussion in 'Editor & General Support' started by StartStart, Mar 20, 2019.

  1. StartStart

    StartStart

    Joined:
    Jan 2, 2013
    Posts:
    150
    Already tried to delete Library folder. And update everything in SDK Manger.
    I tried to re-import Play Service Resolver.
    And re-import Google Play Game Services.

    Anyone happened like me? Thank you for help!

    Code (CSharp):
    1. CommandInvokationFailure: Gradle build failed.
    2. C:\Program Files\Unity2018.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "C:\Program Files\Unity2018.3.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    3.  
    4. stderr[
    5.  
    6. FAILURE: Build failed with an exception.
    7.  
    8. * What went wrong:
    9. A problem occurred configuring root project 'gradleOut'.
    10. > Failed to find Build Tools revision 29.0.0
     
  2. StartStart

    StartStart

    Joined:
    Jan 2, 2013
    Posts:
    150
    I found how to fix

    Go to C:\Users\XXXXXXXXXXXXXXX\AppData\Local\Android\sdk\build-tools

    Move 29.0.0-rc1 out to anywhere boommm build success.

    13 Apr 2020 Note:
    Nowaday you don't need to mess up with any SDK, NDK, JDK

    Unity Hub had install them all for you! just clean up all Unity Editor and fresh install Unity Hub with any Unity Editor version (Don't miss tick Android build support choice and expand that Android choice to tick install other bundle)
     
    Last edited: Apr 13, 2020
  3. __Rob__

    __Rob__

    Joined:
    Sep 10, 2015
    Posts:
    3
    I removed the 29.0.0 version of the SDK Build Tools via Android Studio's SDK manager and that also fixed the problem. Apparently Unity can't handle the release candidate versions of the Build Tools. Ensuring you have the latest version of the Build Tools that doesn't have "rc" in its name should fix this.
     
    NitinAltran and GoodPuppy like this.
  4. Zaied_Aimen

    Zaied_Aimen

    Joined:
    Apr 2, 2020
    Posts:
    1
    unity hub way wont work for me
     
  5. asklinux

    asklinux

    Joined:
    Sep 27, 2020
    Posts:
    1
    try check the project key alias is add or not