Search Unity

Bug facing error : CommandInvokationFailure: Gradle build failed

Discussion in 'Android' started by CITMED, May 20, 2023.

  1. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I am using unity version2021.1.25f1 when I am trying to create apk of my unity project but it is showing me errors which are given below:CommandInvokationFailure: Gradle build failed

    C:\Program Files\Java\jdk1.8.0_202\bin\java.exe -classpath "C:\Program Files\Unity 2021.1.25f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.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 project ':launcher'.
    > Could not resolve all artifacts for configuration ':launcher:classpath'.
    > Could not find com.android.tools.build:gradle:6.7.1.
    Searched in the following locations:
    - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/6.7.1/gradle-6.7.1.pom
    - https://jcenter.bintray.com/com/android/tools/build/gradle/6.7.1/gradle-6.7.1.pom
    Required by:
    project :launcher

    I need help on it. How can I resolve this error.
     
    Last edited: May 21, 2023
  2. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    As it mentions, launcher is expecting 6.7.1 gradle version while your unity recommended version is 6.1.1.
    Usually this happens when you use a plugin which needs a higher gradle version to get it work. Try the following steps in-case if you don't have any other alternative other than upgrading gradle.

    1. Download 6.7.1 gradle from here. (search for 6.7.1 in that page).
    2. Point above extracted folder for Unity Preferences -> External Tools -> Gradle tools entry.

    Let me know how it goes!
     
  3. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I have downloaded the required gradle version, extract the folder in my drive.I have done installation of gradle by setting environmental variable.Using command prompt ,I have checked the version of gradle and it is showing the same version which I have just installed.furthermore in unity external tools I have pointed the extracted folder and when I am trying to build apk it is showing me still error. Error screenshot is attached with this message. How can I sort out this issue.is there need to install any plug-in also? I couldn't understand how to sort it out
     

    Attached Files:

  4. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Let me take a step back!

    Looks like got confused with these two different things and modified with a wrong value in baseProjectTemplate gradle file.

    1. Gradle version
    2. Android Gradle Plugin Version

    While 6.1.1 is a valid gradle version, looks like you set 6.7.1 for Android Gradle Plugin Version (it needs to be 4.0.1 instead).

    Share me your base gradle template file to confirm.
     
  5. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    please find attach screenshot of base file:
     

    Attached Files:

    • base.png
      base.png
      File size:
      223.6 KB
      Views:
      180
  6. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    Actually I am using unity version 2021.1.25f1.This version support gradle version 6.7.1 therefore I have download this graddle version and pointed in my external tool.
    and this is the setting of my external tool for gradle:
     

    Attached Files:

  7. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Share me the latest error (complete log entry) under CommandInvocationFailure entry.
     
  8. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    Please find attachment, attached file include error under commandinvocationfailure:
     

    Attached Files:

  9. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    hi I am waiting of your reply. Errors I have copied the errors from CommandInvocatoinFailure entry to text file for readability.If it is require more information I will provide.Please find the screenshot of gradle version installed in my laptop.Thanks
     

    Attached Files:

  10. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    share your custom gradle files. I still see it's somewhere mentioned about wrong android gradle plugin version.
     
  11. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I didn't customize any gradle file but have done some changes in andriod studio gradle script files and project structure mentioned the gradle version and plugin version.let me share with you these also. First it was showing error in android studio also but now it resolved but unity side it is still showing same error. please find attachment:
     

    Attached Files:

  12. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    It doesn't list the file which has android gradle plugin version defined. Check in your unity project if you have custom gradle files. I see the error can happen only when android gradle plugin version is given wrong value, as per the error.
     
  13. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I didn't give any customize gradle plug-in version value in unity.I just call external tools in unity preference. I am also studying and tried to sort out this issue but couldn't till then. will you please confirm me in base file it is mentioned plug-in version 4.0.1 is it so or need to change?
     
  14. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    in my unity project folder, inside plug-in folder I have two extra file.Screenshot I have attached.
     

    Attached Files:

  15. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Can you try changing from 4.0.1 to 4.2.0 in baseGradleTemplate file, As 6.7.1 needs 4.2.0+ android gradle plugin version.

    We will see if it makes any difference. Please post the complete log under CommandInvocationFailure post it.
     
  16. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    hi I have made the changes in baseGradleTemplate file and run the program, now it is showing me different errors. Please find attached the complete log under CommandInvocationFailure:
     

    Attached Files:

  17. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Delete 33.0.0 and use 30.0.2. If you don't have it, try getting it from android studio installed android sdk. It should fix it!
     
  18. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I have deleted 33.0.0 version and installed Android SDK build tools 34-rc4 ( 30.0.2) .I have deleted previous package and install new one using sdk manager android studio. afterwards I tried to make build but still showing me error. please find attached log shown in commandInvocationFailure:
     

    Attached Files:

  19. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I couldn't understand why is it throwing exception error, when everything is set and installed according to the requirement of the project.
     
  20. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Don't use RC sdk's. Unity won't support. Also, please share "CommandInvocationFailure" error entry alone. That would be enough. Error says the build tools are corrupted.
     
  21. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    but in my android studio it is showing Andriod SDK Build-tools 34-rc4 but package I was using was 33.0.0 and now 30.0.2. in my previous laptop same packages are installed and everything was working fine but one thing is that in my old laptop windows 10 home is installed and in new windows 11 home. could it(windows version and sdk rc version) be the main problem because of which I am continuously facing this issue.what would be the solution of it now.
     

    Attached Files:

    • sdk.png
      sdk.png
      File size:
      103.9 KB
      Views:
      72
  22. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    With out logs, it will be shooting in the dark. Please provide the following
    1. Error log under "CommandInvocationFailure" entry once you try making a build
    2. Screenshot of your unity android sdk build-tools folder and platforms folder.
     
  23. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    Error log:
    1. Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
    2.Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

    3.CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_202\bin\java.exe -classpath "D:\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
    4.
    Build completed with a result of 'Failed' in 61 seconds (61063 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    5. UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <abcf38996a474f319c10e3e20ff8cc9f>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <abcf38996a474f319c10e3e20ff8cc9f>:0
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    Note: screenshot of error log is attached with this message:

    Second Requirement:
    Andriod sdk build tools and platform tools are connected with unity using external tools .there is no any folder inside unity but I am sharing screenshot of packages installed using android studio.
    Screen shot is attached with this message.
    please note version of a)andriod sdk build tool:33.0.00
    b)NDK side-by-side(24.0.8215888)
    c)android sdk command-line-tool(7.0)
    d)CMake (3.18.1)
    I have provided everything you need written as well as screenshot. I want to rectify the problem but it is being prolong
     

    Attached Files:

  24. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Complete error log for CommandInvocationFailure entry is missing.
     
  25. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    i think this screenshot helps you to get commandInvocatonFailure entry in console mode.
     

    Attached Files:

  26. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Please scroll down and copy the complete error log and pass a text. The shared screenshot is only partial and doesn't cover the actual error info.

    Unfortunately, I can't help as the required information is not being shared. The shared one is not the requested one. I need CommanInvocationFailure error log which is 5th entry in the console where as the shared one is 3rd entry.
     
  27. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    this is fifth entry of the CommandInvocationFailur:
    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <abcf38996a474f319c10e3e20ff8cc9f>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <abcf38996a474f319c10e3e20ff8cc9f>:0
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  28. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    first entry in commandInvocationFailure:
    Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

    > Configure project :launcher
    WARNING:: The option setting 'android.enableR8=false' is deprecated.
    It will be removed in version 7.0 of the Android Gradle plugin.
    You will no longer be able to disable R8
    WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
    Currently detected usages:
    - repository flatDir used in: root project 'gradleOut', project ':launcher', project ':unityLibrary'
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Build-tool 33.0.0 is missing DX at C:\Users\jamim\AppData\Local\Android\Sdk\build-tools\33.0.0\dx.bat
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    File C:\Users\jamim\.android\repositories.cfg could not be loaded.
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Build-tool 33.0.0 is missing DX at C:\Users\jamim\AppData\Local\Android\Sdk\build-tools\33.0.0\dx.bat

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  29. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    Second entry:
    Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':launcher:processReleaseResources'.
    > Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.

    * 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
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  30. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    Third Entry:
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk1.8.0_202\bin\java.exe -classpath "D:\gradle-6.7.1\lib\gradle-launcher-6.7.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[
    Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

    Note: can I have a online meeting with you, it will enable me to show you all things related to unity , android studio and my system which are linked. hope by this can identify the actual problem , due to which I recieve exception error.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':launcher:processReleaseResources'.
    > Installed Build Tools revision 33.0.0 is corrupted. Remove and install again using the SDK Manager.

    * 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
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    ]
    stdout[
    Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

    > Configure project :launcher
    WARNING:: The option setting 'android.enableR8=false' is deprecated.
    It will be removed in version 7.0 of the Android Gradle plugin.
    You will no longer be able to disable R8
    WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
    Currently detected usages:
    - repository flatDir used in: root project 'gradleOut', project ':launcher', project ':unityLibrary'
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Build-tool 33.0.0 is missing DX at C:\Users\jamim\AppData\Local\Android\Sdk\build-tools\33.0.0\dx.bat
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    File C:\Users\jamim\.android\repositories.cfg could not be loaded.
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
    Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
    Build-tool 33.0.0 is missing DX at C:\Users\jamim\AppData\Local\Android\Sdk\build-tools\33.0.0\dx.bat
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <04b7ada17ece4f3da2133228ef06844e>:0)
    UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <abcf38996a474f319c10e<message truncated>
     
  31. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    It's still referring 33.0.0. Uninstall and just install a lower version in android studio. I assume you are not using unity's recommended sdk but instead your android studio's sdk.
     
  32. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    I have done deleted this version and installed 30.0.2 but again was showing error. So I decided to delete every package and uninstall andriod studio also and then install again the android studio and related package. so now again going to delete 33.0.0 and install again the 32.0.2.will see how it works
     
  33. CITMED

    CITMED

    Joined:
    Dec 18, 2019
    Posts:
    25
    My effort is successful. I have deleted 33.0.0 and installed again sdk version 30.0.2 you recommended .Thanked God build completed successfully.Thank you very much for help and helping me to know the reason of happening error.I have checked build in my tablet.it is working.Thank you
     
  34. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,965
    Any specific reason for not trying with 30.0.2 build tools earlier?

    However, glad you got it resolved. One thing to note is, even if you install 30.0.2 and if any highest version build tools exists, unity picks it which is not compatible with for your unity version.
     
  35. unity_7BD88DB5C704034C93C0

    unity_7BD88DB5C704034C93C0

    Joined:
    Jan 9, 2024
    Posts:
    11
    Please Tell Me Easy Way to Solve this error
     
  36. LijuDeveloper

    LijuDeveloper

    Joined:
    Oct 9, 2013
    Posts:
    8
    I am facing the same issue. My OS is Windows 11
    I have tried with unity 2021.3.X, 2022.3.x.
    I can make an Android build without adding ARCore or Meta SDK. Adding these packages prevented me from creating an Android app.

    I have tried numerous solutions online, but they have not yielded any results.
    Any solution will be appreciated.