Search Unity

CommandInvokationFailure: Gradle build failed

Discussion in 'Android' started by ramaswamy_rakesh, Jun 1, 2021.

  1. ramaswamy_rakesh

    ramaswamy_rakesh

    Joined:
    Sep 11, 2018
    Posts:
    2
    CommandInvokationFailure: Gradle build failed.
    E:\Program Files (x86)\2021.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "E:\Program Files (x86)\2021.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.6.4.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleDebug"

    stderr[

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:bundleDebugResources'.
    > 1 exception was raised by workers:
    com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
    E:\Tower Defense Game\Tower Crush\Temp\gradleOut\launcher\build\intermediates\bundle_manifest\debug\processDebugManifest\bundle-manifest\AndroidManifest.xml:44: error: unexpected element <queries> found in <manifest>.



    * 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 13s
    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.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
    The current default is 'true'.


    > Configure project :unityLibrary
    WARNING: The option setting 'android.bundle.enableUncompressedNativeLibs=false' is experimental and unsupported.
    The current default is 'true'.


    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:preDebugBuild UP-TO-DATE
    > Task :unityLibrary:checkDebugManifest
    > Task :launcher:prepareLintJar
    > Task :unityLibrary:processDebugManifest
    > Task :unityLibrary:packageDebugRenderscript NO-SOURCE
    > Task :unityLibrary:compileDebugRenderscript NO-SOURCE
    > Task :unityLibrary:generateDebugResValues
    > Task :unityLibrary:generateDebugResources
    > Task :launcher:preDebugBuild
    > Task :launcher:compileDebugRenderscript NO-SOURCE
    > Task :launcher:generateDebugResValues
    > Task :launcher:generateDebugResources
    > Task :launcher:checkDebugManifest
    > Task :launcher:createDebugCompatibleScreenManifests
    > Task :launcher:mainApkListPersistenceDebug
    > Task :unityLibrary:packageDebugResources
    > Task :unityLibrary:mergeDebugShaders
    > Task :unityLibrary:compileDebugShaders
    > Task :unityLibrary:generateDebugAssets
    > Task :launcher:processDebugManifest
    > Task :launcher:mergeDebugResources
    > Task :unityLibrary:packageDebugAssets
    > Task :unityLibrary:compileDebugAidl NO-SOURCE
    > Task :unityLibrary:generateDebugBuildConfig
    > Task :launcher:bundleDebugResources FAILED
    > Task :unityLibrary:generateDebugRFile
    18 actionable tasks: 18 executed
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <f4fe6ee0eb194a68ba39f2b771ad357b>: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 <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f4fe6ee0eb194a68ba39f2b771ad357b>: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 <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <f4fe6ee0eb194a68ba39f2b771ad357b>: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 <f4fe6ee0eb194a68ba39f2b771ad357b>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <f4fe6ee0eb194a68ba39f2b771ad357b>: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 <4cbd678da9d34d10b88d29af4998c9e0>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)