Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Gradle Build Failed error, please help me, CommandInvokationFailure: Gradle build failed. ?

Discussion in 'World Building' started by KartalFatih, May 13, 2022.

  1. KartalFatih

    KartalFatih

    Joined:
    May 13, 2022
    Posts:
    1
    I have error Unity 2019.4.39f1 version.

    "
    CommandInvokationFailure: Gradle build failed.
    C:\Program Files\Java\jdk180333\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.4.39f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    Note:
    E:\GameFiles\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':launcher:bundleReleaseResources'.
    > 1 exception was raised by workers:
    com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
    E:\GameFiles\Temp\gradleOut\launcher\build\intermediates\bundle_manıfest\release\processReleaseManifest\bundle-manifest\AndroidManifest.xml:37: 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

    BUİLD FAILED in 2m 31s
    ]
    stdout[
    Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons 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'.


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


    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    ...."