Jump to content

"Gradle " errors while building WaveXR Unity project for Android


Recommended Posts

Hi,

 

I am trying to build a very simple Unity project.

 

Unity version: 2022.3.41f1

Wave package version:  6.1.0-r8

 

I have properly set-it-up for Android and before importing Wave package, I have been able to build my app into an APK.

 

Then I imported Wave as described in: Getting Started with Wave for Unity Developers - Developer Resources (vive.com)

 

image.thumb.png.e65e74ff206849c525eeba306351cd55.png

 

When I clic on Wave->Preference->Custom Gradle version, I get the following message:

 

image.png.5ff4544043d2487c7acd372cdeb8caf4.png

 

 

Then I clic "Configure unity environment", which got me the following window:

 

image.thumb.png.458e2404c208859820c872d0cae496c6.png

 

I then clicked to import the Android manifest features.

 

When I try to build my project, I get the following errors:

 

Checking the license for package Android SDK Platform 30 in C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
License for package Android SDK Platform 30 accepted.
Preparing "Install Android SDK Platform 30 (revision: 3)".
Warning: Failed to read or create install properties file.

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

 


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalReportRelease'.
> Failed to install the following SDK components:
      platforms;android-30 Android SDK Platform 30
  The SDK directory is not writable (C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK)


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

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

 

 

 

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

Environment Variables:
SHIM_MCCOMPAT = 0x810000001
PROCESSOR_ARCHITECTURE = AMD64
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
DriverData = C:\Windows\System32\Drivers\DriverData
USERDOMAIN = DESKTOP-CNV8AIP
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
COMPUTERNAME = DESKTOP-CNV8AIP
DEBUG_ENV_VAR = UnityHub
LOGONSERVER = \\DESKTOP-CNV8AIP
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
NDK_ROOT = C:\Users\chris\AppData\Local\Android\Sdk\ndk\25.1.8937393
PUBLIC = C:\Users\Public
ProgramData = C:\ProgramData
SESSIONNAME = Console
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
NVIDIAWHITELISTED = 0x01
ANDROID_HOME = C:\AndroidSDK
APPDATA = C:\Users\chris\AppData\Roaming
SystemRoot = C:\Windows
windir = C:\Windows
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
ProgramFiles(x86) = C:\Program Files (x86)
ProgramW6432 = C:\Program Files
OS = Windows_NT
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 165 Stepping 2, GenuineIntel
HOMEPATH = \Users\chris
FPS_BROWSER_USER_PROFILE_STRING = Default
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_20556_DLYDFRVZBRNSABWT
MOZ_PLUGIN_PATH = C:\Program Files (x86)\Kofax\Power PDF 31\Bin
NDKROOT = C:\Users\chris\AppData\Local\Android\Sdk\ndk\25.1.8937393
KMP_DUPLICATE_LIB_OK = TRUE
CommonProgramFiles = C:\Program Files\Common Files
MKL_SERIAL = YES
VS140COMNTOOLS = C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
USERDOMAIN_ROAMINGPROFILE = DESKTOP-CNV8AIP
TEMP = C:\Users\chris\AppData\Local\Temp
ProgramFiles = C:\Program Files
CommonProgramW6432 = C:\Program Files\Common Files
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
PyCharm Community Edition = C:\Program Files\JetBrains\PyCharm Community Edition 2022.1.2\bin;
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
HOMEDRIVE = 😄
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
USERNAME = chris
OneDrive = C:\Users\chris\OneDrive
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
OculusBase = C:\Program Files\Oculus\
NUMBER_OF_PROCESSORS = 12
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
PROCESSOR_LEVEL = 6
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
PROCESSOR_REVISION = a502
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
TMP = C:\Users\chris\AppData\Local\Temp
SystemDrive = 😄
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
ALLUSERSPROFILE = C:\ProgramData
Path = C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot\bin;C:\Program Files\Oculus\Support\oculus-runtime;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin;%C:\Program Files\Python39\Scripts\;C:\Program Files\Python39\;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\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files\Git\cmd;C:\Program Files\Git\bin\;C:\Program Files\Git\cmd\;C:\Users\chris\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\chris\AppData\Local\Programs\Python\Python39\;D:\Program Files2\Scripts\;D:\Program Files2\;C:\Users\chris\AppData\Local\Microsoft\WindowsApps;C:\Users\chris\.dotnet\tools;C:\Program Files2\JetBrains\PyCharm Community Edition 2021.2\bin;C:\Users\chris\AppData\Local\atom\bin;C:\Program Files\JetBrains\PyCharm Community Edition 2022.1.2\bin;;C:\Users\chris\.dotnet\tools;C:\Users\chris\AppData\Local\Android\Sdk\platform-tools;C:\Users\chris\AppData\Local\Android\Sdk\tools;C:\Users\chris\AppData\Local\Android\Sdk\platform-tools;C:\Users\chris\AppData\Local\Android\Sdk\tools;C:\Users\chris\AppData\Local\Android\Sdk\platform-tools;C:\Users\chris\AppData\Local\Android\Sdk\tools;C:\Users\chris\AppData\Local\Android\Sdk\platform-tools;C:\Users\chris\AppData\Local\Android\Sdk\tools
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
LOCALAPPDATA = C:\Users\chris\AppData\Local
USERPROFILE = C:\Users\chris
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3


stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalReportRelease'.
> Failed to install the following SDK components:
      platforms;android-30 Android SDK Platform 30
  The SDK directory is not writable (C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK)


* 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 10s
]
stdout[
Checking the license for package Android SDK Platform 30 in C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
License for package Android SDK Platform 30 accepted.
Preparing "Install Android SDK Platform 30 (revision: 3)".
Warning: Failed to read or create install properties file.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <9cedf0d52e2b458485a933e93180d3da>: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 <9cedf0d52e2b458485a933e93180d3da>: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 <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9cedf0d52e2b458485a933e93180d3da>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

 

 

 

Link to comment
Share on other sites

Hello,

 

 

I think I got it !

 

I upgraded to API Level 30 instead of 29 in Peoject settings->Abdroid and it compiled with no error:

 

 

image.thumb.png.3518f7023bde3d25931ef3e14befa2b5.png

 

 

Sorry for the noise.

 

I got confused by this Gradle thing. In fact it has never been clear to me if in Unity we have to manage Android API versions manually or if Unity was managing it automatically.

Thanks for the answer ! 🙂

 

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...