I’ m new to Unity. I tried to build an apk to oculus quest 2, but an error occured as below.
Enviroment:
I’m using unity 2021.1.0 on Windows 11. And I have no custom gradle file. I also tried unity 2019.4.33 ans it didn’t work. Any useful suggestion will be highly appreciated!
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Here’s the log.
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 resolve com.android.tools.build:gradle:3.4.0.
Required by:
project :launcher
> Could not resolve com.android.tools.build:gradle:3.4.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom'.
> Connect to dl.google.com:443 [dl.google.com/142.250.179.142] failed: Connection timed out: connect
* 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 1m 13s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr)
facing these errors 1-Starting a Gradle Daemon, 1 incompatible Daemon could not be reused 2-An exception has occurred in the compiler (1.8.0-adoptopenjdk). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. 3- UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in 4-Build completed with a result of ‘Failed’ in 1155 seconds (1154985