Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug com.android.build.gradle.internal.tasks.Workers$ActionFacade

Discussion in 'Editor & General Support' started by Fedorsnekhoroshev, Nov 15, 2022.

  1. Fedorsnekhoroshev

    Fedorsnekhoroshev

    Joined:
    Oct 7, 2021
    Posts:
    1
    Hello, an error occurs during the build of the application on the apk:

    > Configure project :launcher
    WARNING: The option setting 'android.enableR8=true' is deprecated.
    It will be removed in version 5.0 of the Android Gradle plugin.
    You will no longer be able to disable R8
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
    Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only

    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:preReleaseBuild UP-TO-DATE
    > Task :launcher:extractProguardFiles UP-TO-DATE
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:compileReleaseAidl NO-SOURCE
    > Task :launcher:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:generateReleaseResValues UP-TO-DATE
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :launcher:generateReleaseBuildConfig UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:javaPreCompileRelease UP-TO-DATE
    > Task :launcher:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResValues UP-TO-DATE
    > Task :launcher:generateReleaseResValues UP-TO-DATE
    > Task :launcher:generateReleaseResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:generateReleaseResources UP-TO-DATE
    > Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
    > Task :unityLibrary:packageReleaseResources UP-TO-DATE
    > Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
    > Task :launcher:extractDeepLinksRelease UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:packageReleaseResources UP-TO-DATE
    > Task :unityLibrary:processReleaseManifest UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:extractDeepLinksRelease UP-TO-DATE
    > Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:processReleaseManifest UP-TO-DATE
    > Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:parseReleaseLocalResources UP-TO-DATE
    > Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
    > Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:generateReleaseRFile UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:compileReleaseLibraryResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:generateReleaseBuildConfig UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:javaPreCompileRelease UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:compileReleaseJavaWithJavac UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:bundleLibCompileToJarRelease UP-TO-DATE
    > Task :unityLibrary:generateReleaseRFile UP-TO-DATE
    > Task :launcher:mergeReleaseResources UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:prepareLintJarForPublish UP-TO-DATE
    > Task :launcher:processReleaseManifest UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:mergeReleaseShaders UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:packageReleaseAssets UP-TO-DATE
    > Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
    > Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
    > Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
    > Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
    > Task :unityLibrary:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:mergeReleaseGeneratedProguardFiles UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:exportReleaseConsumerProguardFiles UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:bundleLibResRelease NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:bundleLibRuntimeToJarRelease UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:mergeReleaseJniLibFolders UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:mergeReleaseNativeLibs UP-TO-DATE
    > Task :unityLibrary:FirebaseApp.androidlib:stripReleaseDebugSymbols NO-SOURCE
    > Task :unityLibrary:FirebaseApp.androidlib:copyReleaseJniLibsProjectOnly UP-TO-DATE
    > Task :unityLibrary:packageReleaseAssets
    > Task :unityLibrary:mergeReleaseGeneratedProguardFiles UP-TO-DATE
    > Task :unityLibrary:exportReleaseConsumerProguardFiles UP-TO-DATE
    > Task :unityLibrary:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:bundleLibResRelease NO-SOURCE
    > Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
    > Task :unityLibrary:mergeReleaseJniLibFolders
    > Task :unityLibrary:mergeReleaseNativeLibs
    > Task :unityLibrary:stripReleaseDebugSymbols
    > Task :unityLibrary:copyReleaseJniLibsProjectOnly
    > Task :launcher:processReleaseResources FAILED
    50 actionable tasks: 6 executed, 44 up-to-date

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


    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.
    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    > Android resource linking failed
    C:\Users\user\.gradle\caches\transforms-2\files-2.1\f243f87f287fb4f4052bd069a9b71980\androidx.core.core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.


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

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

    Build completed with a result of 'Failed' in 50 seconds (50059 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <dc1a47a5816e4be7bc6817ee4d339e75>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <dc1a47a5816e4be7bc6817ee4d339e75>:0
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)



    I have already tried anything, but nothing works constantly error...
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    31,318
    How to troubleshoot build failures:

    First, make a blank project with a single blank scene and prove that it builds successfully.

    If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc.

    Until you can build a blank project to the target platform, don't fiddle with anything else.

    Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

    Most often things that prevent building are third-party libraries such as Firebase.

    Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

    It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

    Android build not building:

    Recently (circa July 2022) there have been reports of Unity's installer failing to install the Android Tools.

    https://forum.unity.com/threads/cant-build-for-android.1306098/

    Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022:

    https://forum.unity.com/threads/aab...y-2021-3-8-with-jdk-1-8.1322211/#post-8551193