Search Unity

Gradle build fail

Discussion in 'Android' started by swifter14, Jan 14, 2020.

  1. swifter14

    swifter14

    Joined:
    Mar 2, 2017
    Posts:
    165
    I don't know what to do anymore, I can't build to Android anymore, there's some issue with the gradle build, I tried to remove the Android folder and it only became worse with more errors, this is the best case I could achieve, this single error-


    Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

    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-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':transformClassesWithMultidexlistForRelease'.
    > com.android.build.api.transform.TransformException: Error while generating the main dex list.
     
  2. GameSpire

    GameSpire

    Joined:
    Jan 31, 2016
    Posts:
    10
    Try set minimal target api 21, it will reduce dex list and compile