Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Android build fails: Could not determine the dependencies of task ':unityLibrary:compileReleaseAidl'

Discussion in 'Editor & General Support' started by NeroBit, Apr 12, 2024.

  1. NeroBit

    NeroBit

    Joined:
    May 24, 2021
    Posts:
    5
    Unity version 2022.3.21f1
    Android resolve and force resolve complete successfully

    Here is full log:

    CommandInvokationFailure: Gradle build failed.
    D:\UnityMain\2022.3.21f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\UnityMain\2022.3.21f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    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: 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:"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:
    Could not determine the dependencies of task ':unityLibrary:compileReleaseAidl'.
    > Could not resolve all task dependencies for configuration ':unityLibrary:releaseCompileClasspath'.
    > Could not find com.google.firebase:firebase-analytics-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-app-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-auth-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-config-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-crashlytics-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-database-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.google.firebase:firebase-messaging-unity:11.8.1.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.adapters:adcolonyadapter:4.3.13.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.adapters:admobadapter:4.3.34.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.adapters:applovinadapter:4.3.36.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.adapters:facebookadapter:4.3.38.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.adapters:unityadsadapter:4.3.24.
    Required by:
    project :unityLibrary
    > Could not find com.ironsource.sdk:mediationsdk:7.4.0.
    Required by:
    project :unityLibrary
    * 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 19s
    ]
    stdout[
    > 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
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    Rethrow as GradleInvokationException: Gradle build failed
    UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <c4379596d7a6422890664bcfc2916b9b>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)