Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Android build fails every time : tried all versions of build tools and fixes. plz help

Discussion in 'Game Design' started by dhiru45, Jan 20, 2018.

  1. dhiru45

    dhiru45

    Joined:
    Jan 20, 2018
    Posts:
    1
    Hello,
    I am using unity 2017.3.0f3 personal on win 8.1 machine. using jdk 1.7.0_79 and build tools 26. when i build on android i i shows gradle build failed. with following errors -

    1--- CommandInvokationFailure: Gradle build failed.
    C:/Program Files/Java/jdk1.7.0_79\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines

    \AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

    stderr[

    FAILURE: Build

    failed with an exception.

    * Where:
    Build file 'C:\Users\LENOVO PC\Documents\newtry\Temp\gradleOut\build.gradle' line: 20


    2------Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    3-----UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono

    \BuildPlayerWindowBuildMethods.cs:181
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono

    \BuildPlayerWindowBuildMethods.cs:88
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    I found some fixed on unity answers. i changed build tools to 23 then 21 but nothing happend. I tried reimporting all assets but no results. then i updated my whole android sdk still no result.

    I even tried a simple unity project with minimal assets and objects and tried to build it. but still same errors.

    now i cant understand what to do. Plz help.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,208