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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Compilation failed for Android

Discussion in 'Editor & General Support' started by icdingu, Aug 24, 2023.

  1. icdingu

    icdingu

    Joined:
    Jun 18, 2023
    Posts:
    3
    I am using Unity 2022.3.3f1
    I want to build a Android but result in error, the windows version can be built successfully, I observed that the android game can be build when using normal 2D template, but since I want to build a Mobile Game, I chose the 2D mobile template, and it will end up in failure even there is only one single GameObject.
    I have tried to look for solution but the error still remains, hopefully there would be solution to end my distress these few days.


    The error log as below



    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    D:\Unity\Unity Projects\GameName \Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:164: error: cannot find symbol
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
    ^
    symbol: variable TIRAMISU
    location: class VERSION_CODES
    D:\Unity\Unity Projects\GameName\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity\androidnotifications\UnityNotificationManager.java:165: error: cannot find symbol
    permissionGranted = mContext.checkCallingOrSelfPermission(Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED;
    ^
    symbol: variable POST_NOTIFICATIONS
    location: class permission
    Note: D:\Unity\Unity Projects\GameName\Library\Bee\Android\Prj\Mono2x\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    2 errors

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':unityLibrary:compileReleaseJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.

    * 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 1s

    0x00007ff7b3a02fdd (Unity) StackWalker::GetCurrentCallstack
    0x00007ff7b3a07f89 (Unity) StackWalker::ShowCallstack
    0x00007ff7b49d2fd1 (Unity) GetStacktrace
    0x00007ff7b5094a12 (Unity) DebugStringToFile
    0x00007ff7b2929786 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000020c49cee443 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    0x0000020c49cee35b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000020c49cee0a0 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x0000020c54144b55 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    0x0000020c54144773 (Mono JIT Code) UnityEditor.Android.GradleInvokationException:parseAndShowException ()
    0x0000020c506a0383 (Mono JIT Code) UnityEditor.Android.PostProcessor.PostProcessRunner:RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext)
    0x0000020c5411c4a3 (Mono JIT Code) UnityEditor.Android.PostProcessAndroidPlayer:postProcess (UnityEditor.Modules.BuildPostProcessArgs,AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput)
    0x0000020c540bdd63 (Mono JIT Code) UnityEditor.Android.AndroidBuildPostprocessor:postProcess (UnityEditor.Modules.BuildPostProcessArgs,UnityEditor.BuildProperties&)
    0x0000020c540bd431 (Mono JIT Code) UnityEditor.PostprocessBuildPlayer:postprocess (UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string,string,string,int,int,UnityEditor.BuildOptions,UnityEditor.RuntimeClassRegistry,UnityEditor.Build.Reporting.BuildReport)
    0x0000020c540bd7a5 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_int_int_object_object_object_int_int_int_object_object (object,intptr,intptr,intptr)
    0x00007ffcefb4e0e4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    0x00007ffcefa8eb84 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
    0x00007ffcefa8ed1c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
    0x00007ff7b3921b04 (Unity) scripting_method_invoke
    0x00007ff7b3900784 (Unity) ScriptingInvocation::Invoke
    0x00007ff7b5408f21 (Unity) CallMono
    0x00007ff7b5411dd7 (Unity) PostprocessPlayer
    0x00007ff7b540c1c3 (Unity) DoBuildPlayer_PostBuild
    0x00007ff7b540a2be (Unity) DoBuildPlayer
    0x00007ff7b53fdbf5 (Unity) BuildPlayer
    0x00007ff7b319e33f (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    0x00007ff7b2ec43bc (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    0x0000020c4ba650f7 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
    0x0000020c4ba64893 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    0x0000020c4ba60c3b (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    0x0000020c4df7dfe3 (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
    0x0000020c4df721cb (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
    0x0000020c4ba5d36b (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
    0x0000020c14d9c042 (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
    0x0000020c14d9be23 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
    0x0000020c14d56ddb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
    0x0000020aadf90a1f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    0x0000020c14d445eb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    0x0000020c4ba47b1b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
    0x0000020c4ba47983 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
    0x0000020c4ba4718b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
    0x0000020c4ba43d33 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
    0x0000020c066a3403 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:processEvent (UnityEngine.UIElements.EventBase)
    0x0000020c066a2f63 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEvent (UnityEngine.UIElements.EventBase)
    0x0000020c066a2c9f (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase)
    0x0000020c066a29d3 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
    0x0000020c4ba4064b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    0x0000020c0d9ad6ae (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
    0x0000020c0d9acf7b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:processEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    0x0000020c0564ce03 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:processEventQueue ()
    0x0000020c0564cc53 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
    0x0000020c0564cb8b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
    0x0000020c0d9ad453 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:processEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    0x0000020c0d9ac853 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
    0x0000020c0d9ac6ab (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
    0x0000020c0d9f5363 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    0x0000020c0d9f4c53 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    0x0000020c0d9f4a0f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr)
    0x0000020c0d9f492b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    0x0000020c0d9f477d (Mono JIT Code) UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
    0x0000020c0d9f4836 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    0x00007ffcefb4e0e4 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
    0x00007ffcefa8eb84 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)
    0x00007ffcefa8ed1c (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)
    0x00007ff7b3921b04 (Unity) scripting_method_invoke
    0x00007ff7b3900784 (Unity) ScriptingInvocation::Invoke
    0x00007ff7b38fb3d5 (Unity) ScriptingInvocation::Invoke<void>
    0x00007ff7b3a4d6fa (Unity) Scripting::UnityEngine::GUIUtilityProxy::processEvent
    0x00007ff7b443f9d8 (Unity) GUIView::processRetainedMode
    0x00007ff7b4a052d4 (Unity) GUIView::OnInputEvent
    0x00007ff7b443f923 (Unity) GUIView::processInputEventFromAPI
    0x00007ff7b443f7f8 (Unity) GUIView::processInputEvent
    0x00007ff7b4a060dc (Unity) GUIView::processEventMessages
    0x00007ff7b49ffdfa (Unity) GUIView::GUIViewWndProc
    0x00007ffd2489e858 (USER32) CallWindowProcW
    0x00007ffd2489e299 (USER32) DispatchMessageW
    0x00007ff7b49d9533 (Unity) MainMessageLoop
    0x00007ff7b49de7b0 (Unity) WinMain
    0x00007ff7b5dc313e (Unity) __scrt_common_main_seh
    0x00007ffd24057614 (KERNEL32) BaseThreadInitThunk
    0x00007ffd251026b1 (ntdll) RtlUserThreadStart
     
  2. M_Dhanu

    M_Dhanu

    Joined:
    Aug 25, 2023
    Posts:
    4
    Hi
    I'm also using the same version and get similar errors. I used 3D core template and have only one gameObject. The errors are listed below. Would be greateful if someone can look into this.

    Starting a Gradle Daemon, 1 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
    > Task :unityLibrary:xrmanifest.androidlib:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :launcher:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseResValues
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseResources
    > Task :launcher:generateReleaseBuildConfig
    > Task :launcher:generateReleaseResValues
    > Task :launcher:javaPreCompileRelease
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseResources
    > Task :launcher:createReleaseCompatibleScreenManifests
    > Task :launcher:extractDeepLinksRelease
    > Task :launcher:extractProguardFiles
    > Task :launcher:mergeReleaseJniLibFolders
    > Task :unityLibrary:mergeReleaseJniLibFolders
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseBuildConfig
    > Task :unityLibrary:generateReleaseResValues
    > Task :unityLibrary:generateReleaseResources
    > Task :unityLibrary:packageReleaseResources
    > Task :unityLibrary:mergeReleaseNativeLibs
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseBuildConfig
    > Task :unityLibrary:xrmanifest.androidlib:javaPreCompileRelease
    > Task :unityLibrary:xrmanifest.androidlib:parseReleaseLocalResources
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseJniLibFolders
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseNativeLibs NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:stripReleaseDebugSymbols NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:copyReleaseJniLibsProjectAndLocalJars
    > Task :unityLibrary:parseReleaseLocalResources
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseShaders
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseAssets
    > Task :unityLibrary:xrmanifest.androidlib:prepareLintJarForPublish
    > Task :launcher:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:prepareReleaseArtProfile
    > Task :unityLibrary:xrmanifest.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :launcher:checkReleaseDuplicateClasses
    > Task :unityLibrary:xrmanifest.androidlib:extractDeepLinksRelease
    > Task :unityLibrary:xrmanifest.androidlib:writeReleaseAarMetadata
    > Task :launcher:mergeReleaseShaders
    > Task :launcher:compileReleaseShaders NO-SOURCE
    > Task :launcher:generateReleaseAssets UP-TO-DATE
    > Task :launcher:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseLibraryResources
    > Task :unityLibrary:xrmanifest.androidlib:bundleLibResRelease NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:writeReleaseLintModelMetadata
    > Task :unityLibrary:xrmanifest.androidlib:copyReleaseJniLibsProjectOnly
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseJavaResource
    > Task :unityLibrary:xrmanifest.androidlib:processReleaseManifest
    > Task :launcher:collectReleaseDependencies
    > Task :launcher:sdkReleaseDependencyData
    > Task :launcher:validateSigningRelease
    > Task :launcher:writeReleaseAppMetadata
    > Task :launcher:writeReleaseSigningConfigVersions
    > Task :unityLibrary:stripReleaseDebugSymbols
    > Task :unityLibrary:javaPreCompileRelease
    > Task :unityLibrary:mergeReleaseShaders
    > Task :unityLibrary:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:processReleaseManifest
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseRFile
    > Task :unityLibrary:packageReleaseAssets
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:prepareLintJarForPublish
    > Task :unityLibrary:prepareReleaseArtProfile
    > Task :launcher:desugarReleaseFileDependencies
    > Task :unityLibrary:processReleaseJavaRes
    > Task :unityLibrary:copyReleaseJniLibsProjectAndLocalJars
    > Task :unityLibrary:mergeReleaseJavaResource
    > Task :unityLibrary:writeReleaseAarMetadata
    > Task :unityLibrary:extractDeepLinksRelease
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseJavaWithJavac
    > Task :unityLibrary:compileReleaseLibraryResources
    > Task :unityLibrary:writeReleaseLintModelMetadata
    > Task :unityLibrary:bundleLibResRelease
    > Task :unityLibrary:xrmanifest.androidlib:bundleLibCompileToJarRelease
    > Task :unityLibrary:generateReleaseRFile
    > Task :launcher:mergeReleaseAssets
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:generateReleaseResources
    > Task :launcher:checkReleaseAarMetadata
    > Task :unityLibrary:copyReleaseJniLibsProjectOnly

    > Task :launcher:processReleaseMainManifest
    [:arcore_client:] C:\Users\DA 2018tx\.gradle\caches\transforms-3\ece6358c3c3b544f3d6f3cc51ffa918c\transformed\arcore_client\AndroidManifest.xml Warning:
    Package name 'com.google.ar.core' used in: :arcore_client:, :unityandroidpermissions:.

    > Task :launcher:processReleaseManifest
    > Task :launcher:mergeReleaseNativeLibs
    > Task :launcher:mergeExtDexRelease
    > Task :launcher:mergeReleaseResources
    > Task :launcher:stripReleaseDebugSymbols
    > Task :launcher:mergeReleaseArtProfile
    > Task :launcher:processReleaseManifestForPackage
    > Task :launcher:extractReleaseNativeSymbolTables
    > Task :launcher:mergeReleaseNativeDebugMetadata NO-SOURCE
    > Task :launcher:compressReleaseAssets
    > Task :launcher:mergeReleaseJavaResource
    > Task :launcher:processReleaseResources
    > Task :launcher:eek:ptimizeReleaseResources
    > Task :unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations
    > Task :unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations FAILED
    75 actionable tasks: 75 executed

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


    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations'.
    > Could not resolve all files for configuration ':unityLibrary:xrmanifest.androidlib:detachedConfiguration2'.
    > Could not download groovy-groovysh-3.0.8.jar (org.codehaus.groovy:groovy-groovysh:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven...oovy-groovysh/3.0.8/groovy-groovysh-3.0.8.jar'.
    > Connection reset
    > Could not download groovy-console-3.0.8.jar (org.codehaus.groovy:groovy-console:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven...groovy-console/3.0.8/groovy-console-3.0.8.jar'.
    > Connection reset
    > Could not download groovy-3.0.8.jar (org.codehaus.groovy:groovy:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/3.0.8/groovy-3.0.8.jar'.
    > Connection reset
    > Could not download ant-1.10.9.jar (org.apache.ant:ant:1.10.9)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.10.9/ant-1.10.9.jar'.
    > Connection reset
    > Could not download javaparser-core-3.18.0.jar (com.github.javaparser:javaparser-core:3.18.0)
    > Could not get resource 'https://repo.maven.apache.org/maven...parser-core/3.18.0/javaparser-core-3.18.0.jar'.
    > Connection reset
    > Could not download testng-7.4.0.jar (org.testng:testng:7.4.0)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/testng/testng/7.4.0/testng-7.4.0.jar'.
    > Connection reset

    * 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 16m 52s

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


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

    Environment Variables:
    RegionCode = APJ
    USERDOMAIN = MJ
    ProgramFiles = C:\Program Files
    TMP = C:\Users\DA2018~1\AppData\Local\Temp
    PROCESSOR_ARCHITECTURE = AMD64
    PROCESSOR_REVISION = 8e0c
    OneDriveConsumer = C:\Users\DA 2018tx\OneDrive
    OS = Windows_NT
    CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_16132_ZTTPGXVEBRYHZIQH
    PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
    AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
    USERPROFILE = C:\Users\DA 2018tx
    JAVA_HOME = G:\SW\Unity 3D\2022.3.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
    CommonProgramFiles = C:\Program Files\Common Files
    DriverData = C:\Windows\System32\Drivers\DriverData
    ComSpec = C:\WINDOWS\system32\cmd.exe
    LAUNCH_DARKLY_CLIENT_TOKEN = 60a7e30fafc7e60e33446283
    PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    EFC_4288 = 1
    SystemRoot = C:\WINDOWS
    HEAP_CLIENT_TOKEN = 1717415662
    platformcode = KV
    NUMBER_OF_PROCESSORS = 8
    AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
    WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
    JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
    DEBUG_ENV_VAR = UnityHub
    ProgramW6432 = C:\Program Files
    FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
    HOMEDRIVE = C:
    TEMP = C:\Users\DA2018~1\AppData\Local\Temp
    Path = C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\DA 2018tx\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\DA 2018tx\AppData\Local\Programs\Python\Python38\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\DA 2018tx\AppData\Local\Microsoft\WindowsApps;C:\Users\DA 2018tx\AppData\Local\GitHubDesktop\bin;C:\PHP;;C:\Microsoft VS Code\bin
    USERNAME = DA 2018tx
    COMPUTERNAME = MJ
    USERDOMAIN_ROAMINGPROFILE = MJ
    PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    SystemDrive = C:
    ALLUSERSPROFILE = C:\ProgramData
    SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
    OnlineServices = Online Services
    HEAP_CLIENT_TOKEN_STAGING = 3786794399
    ProgramData = C:\ProgramData
    FPS_BROWSER_USER_PROFILE_STRING = Default
    windir = C:\WINDOWS
    ZES_ENABLE_SYSMAN = 1
    PUBLIC = C:\Users\Public
    CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
    APPDATA = C:\Users\DA 2018tx\AppData\Roaming
    PROCESSOR_LEVEL = 6
    CommonProgramW6432 = C:\Program Files\Common Files
    ProgramFiles(x86) = C:\Program Files (x86)
    NVIDIAWHITELISTED = 0x01
    SESSIONNAME = Console
    LOGONSERVER = \\MJ
    LOCALAPPDATA = C:\Users\DA 2018tx\AppData\Local
    HOMEPATH = \Users\DA 2018tx
    LAUNCH_DARKLY_CLIENT_TOKEN_STAGING = 60a7e30fafc7e60e33446282
    SHIM_MCCOMPAT = 0x810000001
    OneDrive = C:\Users\DA 2018tx\OneDrive
    VS160COMCOMNTOOLS = C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\
    ORIGINAL_XDG_CURRENT_DESKTOP = undefined


    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations'.
    > Could not resolve all files for configuration ':unityLibrary:xrmanifest.androidlib:detachedConfiguration2'.
    > Could not download groovy-groovysh-3.0.8.jar (org.codehaus.groovy:groovy-groovysh:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven...oovy-groovysh/3.0.8/groovy-groovysh-3.0.8.jar'.
    > Connection reset
    > Could not download groovy-console-3.0.8.jar (org.codehaus.groovy:groovy-console:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven...groovy-console/3.0.8/groovy-console-3.0.8.jar'.
    > Connection reset
    > Could not download groovy-3.0.8.jar (org.codehaus.groovy:groovy:3.0.8)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/3.0.8/groovy-3.0.8.jar'.
    > Connection reset
    > Could not download ant-1.10.9.jar (org.apache.ant:ant:1.10.9)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.10.9/ant-1.10.9.jar'.
    > Connection reset
    > Could not download javaparser-core-3.18.0.jar (com.github.javaparser:javaparser-core:3.18.0)
    > Could not get resource 'https://repo.maven.apache.org/maven...parser-core/3.18.0/javaparser-core-3.18.0.jar'.
    > Connection reset
    > Could not download testng-7.4.0.jar (org.testng:testng:7.4.0)
    > Could not get resource 'https://repo.maven.apache.org/maven2/org/testng/testng/7.4.0/testng-7.4.0.jar'.
    > Connection reset

    * 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 16m 52s
    ]
    stdout[
    Starting a Gradle Daemon, 1 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
    > Task :unityLibrary:xrmanifest.androidlib:preBuild UP-TO-DATE
    > Task :launcher:preBuild UP-TO-DATE
    > Task :unityLibrary:preBuild UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:preReleaseBuild UP-TO-DATE
    > Task :launcher:preReleaseBuild UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseResValues
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseResources
    > Task :launcher:generateReleaseBuildConfig
    > Task :launcher:generateReleaseResValues
    > Task :launcher:javaPreCompileRelease
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseResources
    > Task :launcher:createReleaseCompatibleScreenManifests
    > Task :launcher:extractDeepLinksRelease
    > Task :launcher:extractProguardFiles
    > Task :launcher:mergeReleaseJniLibFolders
    > Task :unityLibrary:mergeReleaseJniLibFolders
    > Task :unityLibrary:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:generateReleaseBuildConfig
    > Task :unityLibrary:generateReleaseResValues
    > Task :unityLibrary:generateReleaseResources
    > Task :unityLibrary:packageReleaseResources
    > Task :unityLibrary:mergeReleaseNativeLibs
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseBuildConfig
    > Task :unityLibrary:xrmanifest.androidlib:javaPreCompileRelease
    > Task :unityLibrary:xrmanifest.androidlib:parseReleaseLocalResources
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseJniLibFolders
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseNativeLibs NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:stripReleaseDebugSymbols NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:copyReleaseJniLibsProjectAndLocalJars
    > Task :unityLibrary:parseReleaseLocalResources
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseShaders
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:xrmanifest.androidlib:packageReleaseAssets
    > Task :unityLibrary:xrmanifest.androidlib:prepareLintJarForPublish
    > Task :launcher:compileReleaseAidl NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:prepareReleaseArtProfile
    > Task :unityLibrary:xrmanifest.androidlib:processReleaseJavaRes NO-SOURCE
    > Task :launcher:checkReleaseDuplicateClasses
    > Task :unityLibrary:xrmanifest.androidlib:extractDeepLinksRelease
    > Task :unityLibrary:xrmanifest.androidlib:writeReleaseAarMetadata
    > Task :launcher:mergeReleaseShaders
    > Task :launcher:compileReleaseShaders NO-SOURCE
    > Task :launcher:generateReleaseAssets UP-TO-DATE
    > Task :launcher:processReleaseJavaRes NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseLibraryResources
    > Task :unityLibrary:xrmanifest.androidlib:bundleLibResRelease NO-SOURCE
    > Task :unityLibrary:xrmanifest.androidlib:writeReleaseLintModelMetadata
    > Task :unityLibrary:xrmanifest.androidlib:copyReleaseJniLibsProjectOnly
    > Task :unityLibrary:xrmanifest.androidlib:mergeReleaseJavaResource
    > Task :unityLibrary:xrmanifest.androidlib:processReleaseManifest
    > Task :launcher:collectReleaseDependencies
    > Task :launcher:sdkReleaseDependencyData
    > Task :launcher:validateSigningRelease
    > Task :launcher:writeReleaseAppMetadata
    > Task :launcher:writeReleaseSigningConfigVersions
    > Task :unityLibrary:stripReleaseDebugSymbols
    > Task :unityLibrary:javaPreCompileRelease
    > Task :unityLibrary:mergeReleaseShaders
    > Task :unityLibrary:compileReleaseShaders NO-SOURCE
    > Task :unityLibrary:generateReleaseAssets UP-TO-DATE
    > Task :unityLibrary:processReleaseManifest
    > Task :unityLibrary:xrmanifest.androidlib:generateReleaseRFile
    > Task :unityLibrary:packageReleaseAssets
    > Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
    > Task :unityLibrary:prepareLintJarForPublish
    > Task :unityLibrary:prepareReleaseArtProfile
    > Task :launcher:desugarReleaseFileDependencies
    > Task :unityLibrary:processReleaseJavaRes
    > Task :unityLibrary:copyReleaseJniLibsProjectAndLocalJars
    > Task :unityLibrary:mergeReleaseJavaResource
    > Task :unityLibrary:writeReleaseAarMetadata
    > Task :unityLibrary:extractDeepLinksRelease
    > Task :unityLibrary:xrmanifest.androidlib:compileReleaseJavaWithJavac
    > Task :unityLibrary:compileReleaseLibraryResources
    > Task :unityLibrary:writeReleaseLintModelMetadata
    > Task :unityLibrary:bundleLibResRelease
    > Task :unityLibrary:xrmanifest.androidlib:bundleLibCompileToJarRelease
    > Task :unityLibrary:generateReleaseRFile
    > Task :launcher:mergeReleaseAssets
    > Task :launcher:compileReleaseRenderscript NO-SOURCE
    > Task :launcher:generateReleaseResources
    > Task :launcher:checkReleaseAarMetadata
    > Task :unityLibrary:copyReleaseJniLibsProjectOnly

    > Task :launcher:processReleaseMainManifest
    [:arcore_client:] C:\Users\DA 2018tx\.gradle\caches\transforms-3\ece6358c3c3b544f3d6f3cc51ffa918c\transformed\arcore_client\AndroidManifest.xml Warning:
    Package name 'com.google.ar.core' used in: :arcore_client:, :unityandroidpermissions:.

    > Task :launcher:processReleaseManifest
    > Task :launcher:mergeReleaseNativeLibs
    > Task :launcher:mergeExtDexRelease
    > Task :launcher:mergeReleaseResources
    > Task :launcher:stripReleaseDebugSymbols
    > Task :launcher:mergeReleaseArtProfile
    > Task :launcher:processReleaseManifestForPackage
    > Task :launcher:extractReleaseNativeSymbolTables
    > Task :launcher:mergeReleaseNativeDebugMetadata NO-SOURCE
    > Task :launcher:compressReleaseAssets
    > Task :launcher:mergeReleaseJavaResource
    > Task :launcher:processReleaseResources
    > Task :launcher:eek:ptimizeReleaseResources
    > Task :unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations
    > Task :unityLibrary:xrmanifest.androidlib:extractReleaseAnnotations FAILED
    75 actionable tasks: 75 executed
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3692a30af1114a098ee2388137c8a827>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3692a30af1114a098ee2388137c8a827>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <3692a30af1114a098ee2388137c8a827>:0)
    UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <3692a30af1114a098ee2388137c8a827>: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 <3692a30af1114a098ee2388137c8a827>: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 <3692a30af1114a098ee2388137c8a827>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3692a30af1114a098ee2388137c8a827>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3692a30af1114a098ee2388137c8a827>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,954
    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. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

    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 (edited on August 23, 2023 to include Android SDK 33...):

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

    Android Gradle errors and other related stuff:

    https://forum.unity.com/threads/unity-gradle-bug-please-help.1368018/#post-8625789
     
    M_Dhanu likes this.
  4. flyhigh7747hd

    flyhigh7747hd

    Joined:
    Aug 25, 2023
    Posts:
    1
    same issue. Can you elaborate on how to go about bisecting/ building it one system at a time? I'm able to build out a blank no problem. could it be something like third party CloudOnce? or asset stores Cross Platform Native Plugins? something like that? I've tried delating all elements only keeping assets & project settings (in the unity folder). Is there more to bisecting/ building out systems that I need to do? great explanation by the way. its hard to wrap the head around the jargon sometimes. (new to everything by the way thanks in advance)
     
    Last edited: Aug 25, 2023
  5. icdingu

    icdingu

    Joined:
    Jun 18, 2023
    Posts:
    3
    As I observed that the problem was caused by Mobile template, I simply removed the Window -> Package Manager -> Features -> Mobile, although I don't really think this should be a solution, it built successfully.