Search Unity

Question Build Errors! Project laucher, Mapping ns, Gradle build failure, and more!

Discussion in 'Editor & General Support' started by NDPNDNT, Aug 15, 2022.

  1. NDPNDNT

    NDPNDNT

    Joined:
    Aug 8, 2022
    Posts:
    3
    I am attempting to build my project and keep getting errors. upload_2022-8-14_18-8-47.png
    1)
    WARNING: The option setting 'android.enableR8=false' is deprecated.
    It will be removed in version 5.0 of the Android Gradle plugin.
    You will no longer be able to disable R8

    2)
    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:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
    Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
    > Failed to calculate the value of task ':unityLibrary:compileReleaseJavaWithJavac' property 'options.generatedSourceOutputDirectory'.

    3)
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Unity\Hub\Editor\2021.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Users\robert.hopper\Downloads\gradle-7.5.1-bin\gradle-7.5.1\lib\gradle-launcher-7.5.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    4)
    Build completed with a result of 'Failed' in 135 seconds (134758 ms)
    UnityEditor.GenericMenu:CatchMenu (object,string[],int)

    5)
    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <33518779906b403ba9f96eccba6a861b>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <33518779906b403ba9f96eccba6a861b>:0
    UnityEditor.GenericMenu:CatchMenu (object,string[],int)


    sooooo I don't even know where to begin. I have tried the suggested Gradle version Unity suggests, same result. I tired the latest release of Gradle 8.0, same results.

    any help would be greatly appreciated!
     
  2. NDPNDNT

    NDPNDNT

    Joined:
    Aug 8, 2022
    Posts:
    3
    Update:

    So I created a custom Base Gradel Template and added the org.gradle.warning.mode=all property I ran the build and got different errors this time. It says the use of jCenter() is deprecated and will be removed with Gradle 8.0. the documentation suggests to use mavenCentral() instead. So I did this and now I get...
    FAILURE: Build failed with an exception.
    I have gradle 7.5.1 installed and Unity pointed to the path of gradel 7.5.1 so what now?