Не компилируется проект Unity3d (android) Build Gradle Failed

Рейтинг: 1Ответов: 0Опубликовано: 04.07.2023

Я пытаюсь скомпилировать свой проект в Unity (под Android) и у меня сначала все идет быстро а потом он зависает на Unity завис на компиляции

Через некоторое время Unity отвисает и появляется сразу 6 ошибок:

Первая:

Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

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

Вторая:

Error displaying dialog: Текущий процесс использовал все системные разрешения по управлению объектами диспетчера окон.

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

Третья:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
   > Could not download gradle-4.0.1.jar (com.android.tools.build:gradle:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.jar'.
         > Read timed out
   > Could not download builder-4.0.1.jar (com.android.tools.build:builder:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.0.1/builder-4.0.1.jar'.
         > Read timed out
   > Could not download bundletool-0.13.2.jar (com.android.tools.build:bundletool:0.13.2)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.13.2/bundletool-0.13.2.jar'.
         > Read timed out
   > Could not download bcprov-jdk15on-1.56.jar (org.bouncycastle:bcprov-jdk15on:1.56)
      > Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar'.
         > Read timed out
   > Could not download kotlin-stdlib-1.3.72.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.72)
      > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.72/kotlin-stdlib-1.3.72.jar'.
         > Read timed out

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

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

Четвертая:

CommandInvokationFailure: Gradle build failed. 
C:\Unity\Versions\2021.3.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Unity\Versions\2021.3.27f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

Environment Variables:
USERDOMAIN = DESKTOP-UT5NLB5
ProgramFiles = C:\Program Files
TMP = C:\Users\KUZINA~1\AppData\Local\Temp
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_REVISION = 3d04
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_10588_TANFJDKCFUBGSCAC
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
USERPROFILE = C:\Users\KuzinAlexandr
JAVA_HOME = C:\Unity\Versions\2021.3.27f1\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;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\PowerShell\Modules\
PUBLIC = C:\Users\Public
SystemRoot = C:\Windows
HEAP_CLIENT_TOKEN = 1717415662
NUMBER_OF_PROCESSORS = 4
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\KUZINA~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\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Users\KuzinAlexandr\AppData\Local\Microsoft\WindowsApps;
USERNAME = KuzinAlexandr
COMPUTERNAME = DESKTOP-UT5NLB5
USERDOMAIN_ROAMINGPROFILE = DESKTOP-UT5NLB5
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
SystemDrive = C:
ALLUSERSPROFILE = C:\ProgramData
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
HEAP_CLIENT_TOKEN_STAGING = 3786794399
FPS_BROWSER_USER_PROFILE_STRING = Default
windir = C:\Windows
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\KuzinAlexandr\AppData\Roaming
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
SESSIONNAME = Console
LOGONSERVER = \\DESKTOP-UT5NLB5
LOCALAPPDATA = C:\Users\KuzinAlexandr\AppData\Local
HOMEPATH = \Users\KuzinAlexandr
LAUNCH_DARKLY_CLIENT_TOKEN_STAGING = 60a7e30fafc7e60e33446282
__COMPAT_LAYER = DetectorsAppHealth
OneDrive = C:\Users\KuzinAlexandr\OneDrive
ProgramData = C:\ProgramData
ORIGINAL_XDG_CURRENT_DESKTOP = undefined


stderr[

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':launcher'.
> Could not resolve all artifacts for configuration ':launcher:classpath'.
   > Could not download gradle-4.0.1.jar (com.android.tools.build:gradle:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.jar'.
         > Read timed out
   > Could not download builder-4.0.1.jar (com.android.tools.build:builder:4.0.1)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/4.0.1/builder-4.0.1.jar'.
         > Read timed out
   > Could not download bundletool-0.13.2.jar (com.android.tools.build:bundletool:0.13.2)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.13.2/bundletool-0.13.2.jar'.
         > Read timed out
   > Could not download bcprov-jdk15on-1.56.jar (org.bouncycastle:bcprov-jdk15on:1.56)
      > Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.jar'.
         > Read timed out
   > Could not download kotlin-stdlib-1.3.72.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.72)
      > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.72/kotlin-stdlib-1.3.72.jar'.
         > Read timed out

* 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 34m 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
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <7cd4f681d9474b24b7953907944eefaf>: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 <7cd4f681d9474b24b7953907944eefaf>: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 <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7cd4f681d9474b24b7953907944eefaf>: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 <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7cd4f681d9474b24b7953907944eefaf>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <a53e7cd0bf8c4035ac3e78fb7b43c4a6>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Пятая:

Build completed with a result of 'Failed' in 2202 seconds (2201523 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Шестая:

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

Версия Unity: 2021.3.27f1

Ответы

Ответов пока нет.