I am trying to run a VR Projekt for an Android Build on Unity Version 2022.3.23f1. I also installed the JDK and SDK tools for Android. As soon as I try to process the build as a normal User I ran into several Errors.:
“Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details”
“Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8”
“CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2022.3.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath “C:\Program Files\Unity\Hub\Editor\2022.3.23f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar” org.gradle.launcher.GradleMain “-Dorg.gradle.jvmargs=-Xmx4096m” “assembleRelease””
I added the error logs from the console.
If I start Unity via admin privileges the build will run without any problems, but Unity is not supposed to run as an admin.
Is this problem known and is there a solution?
The problem is urgent, because my learning/programming class is starting soon and the students are working with Unity all the time.
Very likely that the problem is due to file/folder or other permissions. You may have installed the JDK with admin rights where you shouldn’t have, or either of these (JDK, editor, project, anything else related) is in a folder where a standard user account has no write and/or execute permissions. Or the user you’re logged in with has limited permissions to begin with.
A complete uninstall of editors, hub and jdk and reinstall may help, ideally to default locations. If not then doing so in a new user account might be an alternative.
@CodeSmile
Only the Admin is able to install Unity and the SDK/JDK Add-Ons.
The same errors accure under Unity 2022.3.24f1
I installed Unity in default location and Users also got permissions.
Maybe you see something in the logs I dont see.
Launching the installers etc without “run as administrator” should pop up the corresponding UAC control or login dialog when the executable requests it. That’s the procedure you should follow. If this fails without either of these options, the account is incorrectly set up or too restricted (eg by policy).
Check if you have this Universal C Runtime installed.
Otherwise not being able to launch a Daemon (service) could also indicate a system/account that has insufficient rights to perform launching a service.