I’m going to lose my mind
I have tried everything possible and nothing has helped. I keep getting this stupid error when I’m trying to build my game for Quest 2. Is there anyone who could help me?? Please help if you can!
I’m going to lose my mind
I have tried everything possible and nothing has helped. I keep getting this stupid error when I’m trying to build my game for Quest 2. Is there anyone who could help me?? Please help if you can!
Try the latest LTS version
If it still happens copy over the full errors. Can’t see much now
Heres the errors I copied:
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preDebugBuild UP-TO-DATE
Task :unityLibrary:preDebugBuild UP-TO-DATE
Task :unityLibrary:compileDebugAidl NO-SOURCE
Task :unityLibrary:packageDebugRenderscript NO-SOURCE
Task :unityLibrary:compileDebugRenderscript NO-SOURCE
Task :unityLibrary:generateDebugResValues
Task :unityLibrary:generateDebugResources
Task :launcher:generateDebugBuildConfig
Task :launcher:compileDebugAidl NO-SOURCE
Task :launcher:compileDebugRenderscript NO-SOURCE
Task :launcher:generateDebugResValues
Task :launcher:generateDebugResources
Task :launcher:createDebugCompatibleScreenManifests
Task :launcher:extractDeepLinksDebug
Task :launcher:mergeDebugShaders
Task :launcher:compileDebugShaders NO-SOURCE
Task :launcher:generateDebugAssets UP-TO-DATE
Task :launcher:processDebugJavaRes NO-SOURCE
Task :unityLibrary:packageDebugResources
Task :unityLibrary:extractDeepLinksDebug
Task :launcher:checkDebugDuplicateClasses
Task :unityLibrary:generateDebugBuildConfig
Task :unityLibrary:mergeDebugShaders
Task :unityLibrary:processDebugManifest
Task :unityLibrary:compileDebugShaders NO-SOURCE
Task :unityLibrary:generateDebugAssets UP-TO-DATE
Task :launcher:javaPreCompileDebug
Task :unityLibrary:packageDebugAssets
Task :unityLibrary:processDebugJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResDebug NO-SOURCE
Task :launcher:processDebugManifest
Task :launcher:mergeDebugAssets
Task :launcher:mergeDebugJniLibFolders
Task :launcher:validateSigningDebug
Task :launcher:mergeDebugResources
Task :launcher:mergeDebugJavaResource
Task :unityLibrary:mergeDebugJniLibFolders
Task :unityLibrary:compileDebugLibraryResources
Task :unityLibrary:parseDebugLocalResources
Task :unityLibrary:javaPreCompileDebug
Task :unityLibrary:mergeDebugNativeLibs
Task :unityLibrary:stripDebugDebugSymbols
Task :launcher:desugarDebugFileDependencies
Task :unityLibrary:copyDebugJniLibsProjectOnly
Task :unityLibrary:generateDebugRFile
Task :launcher:processDebugResources
Task :launcher:mergeExtDexDebug
Task :launcher:mergeDebugNativeLibs FAILED
Task :unityLibrary:compileDebugJavaWithJavac
33 actionable tasks: 33 executed
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Note: C:\Users\jfior\Downloads\EpicJohn Studios\Games\VR\Monkey Party\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path ‘lib/arm64-v8a/libopenxr_loader.so’. If you are using jniLibs and CMake IMPORTED targets, see Nuevas funciones de la versión preliminar de Android Studio | Android Studio | Android Developers
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path ‘lib/arm64-v8a/libopenxr_loader.so’. If you are using jniLibs and CMake IMPORTED targets, see Nuevas funciones de la versión preliminar de Android Studio | Android Studio | Android Developers
Configure project :launcher
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preDebugBuild UP-TO-DATE
Task :unityLibrary:preDebugBuild UP-TO-DATE
Task :unityLibrary:compileDebugAidl NO-SOURCE
Task :unityLibrary:packageDebugRenderscript NO-SOURCE
Task :unityLibrary:compileDebugRenderscript NO-SOURCE
Task :unityLibrary:generateDebugResValues
Task :unityLibrary:generateDebugResources
Task :launcher:generateDebugBuildConfig
Task :launcher:compileDebugAidl NO-SOURCE
Task :launcher:compileDebugRenderscript NO-SOURCE
Task :launcher:generateDebugResValues
Task :launcher:generateDebugResources
Task :launcher:createDebugCompatibleScreenManifests
Task :launcher:extractDeepLinksDebug
Task :launcher:mergeDebugShaders
Task :launcher:compileDebugShaders NO-SOURCE
Task :launcher:generateDebugAssets UP-TO-DATE
Task :launcher:processDebugJavaRes NO-SOURCE
Task :unityLibrary:packageDebugResources
Task :unityLibrary:extractDeepLinksDebug
Task :launcher:checkDebugDuplicateClasses
Task :unityLibrary:generateDebugBuildConfig
Task :unityLibrary:mergeDebugShaders
Task :unityLibrary:processDebugManifest
Task :unityLibrary:compileDebugShaders NO-SOURCE
Task :unityLibrary:generateDebugAssets UP-TO-DATE
Task :launcher:javaPreCompileDebug
Task :unityLibrary:packageDebugAssets
Task :unityLibrary:processDebugJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResDebug NO-SOURCE
Task :launcher:processDebugManifest
Task :launcher:mergeDebugAssets
Task :launcher:mergeDebugJniLibFolders
Task :launcher:validateSigningDebug
Task :launcher:mergeDebugResources
Task :launcher:mergeDebugJavaResource
Task :unityLibrary:mergeDebugJniLibFolders
Task :unityLibrary:compileDebugLibraryResources
Task :unityLibrary:parseDebugLocalResources
Task :unityLibrary:javaPreCompileDebug
Task :unityLibrary:mergeDebugNativeLibs
Task :unityLibrary:stripDebugDebugSymbols
Task :launcher:desugarDebugFileDependencies
Task :unityLibrary:copyDebugJniLibsProjectOnly
Task :unityLibrary:generateDebugRFile
Task :launcher:processDebugResources
Task :launcher:mergeExtDexDebug
Task :launcher:mergeDebugNativeLibs FAILED
Task :unityLibrary:compileDebugJavaWithJavac
33 actionable tasks: 33 executed
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <4a8943a7ff7048deb64e0a5059f78d1d>: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 <4a8943a7ff7048deb64e0a5059f78d1d>: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 <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>: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 <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <4a8943a7ff7048deb64e0a5059f78d1d>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4a8943a7ff7048deb64e0a5059f78d1d>: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 <5f40cdb07bd44d76a23dad985a4ec283>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Build completed with a result of ‘Failed’ in 207 seconds (207344 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <5f40cdb07bd44d76a23dad985a4ec283>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <5f40cdb07bd44d76a23dad985a4ec283>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Do you use a custom androidmanifest or publishing settings?
No
Does it happen in a blank project?
No, the project has quite a bit of files inside. I’ve been working on it for a few weeks.
So, any idea on what exactly i should do?
I kept getting similar errors every time I tried building my VR project, and it was driving me crazy. Then after trying a whole lot of other things that didn’t solve the problem, I went into the android tab in Project Settings → XR Plug-in Management and selected the OpenXR checkbox instead of Oculus, and the next time I tried to build the project it worked. (I’d been fiddling with those checkboxes before because I’d first tried to get the project to run on the Oculus in Play mode and had a big struggle with that; it eventually turned out that for that to work the XR Plug-in Management had to be set to Oculus in the Windows tab… but not the Android tab, I guess. Hm.)
Not sure whether this will help you; it’s possible there’s more than one thing that could be causing this error, or I guess it’s possible that that wasn’t what was causing the error at all but whatever was causing it coincidentally cleared up the same time I made that setting change, but I figured I’d share this just in case.
I tried, and it worked! Thanks so much man! you saved my ass and my sanity!
You really saved my life thank you sooooo much!!! I’m looking through the whole internet and have tried at least 10 times with different methods and yours is working perfectly
I’ve been having absolutely no luck for a good while now, can’t figure it out whatsoever, had the same error so expected the same fix to work. Still doesn’t…
Try this post: How to remove android.enableR8' from the project - Questions & Answers - Unity Discussions
Looks like you have to fix the big “WARNING: The option setting ‘android.enableR8=false’ is deprecated” line. You might have to revert back to some older changes for the time being.
Also these posts might be helpful: unity game engine - The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle - Stack Overflow
One must admit that it is totally ridiculous that the tool, the integrated version of Gradle that comes with the version of the Unity Editor we’re forced to use, the same very one that’s found in the Hub, would be generating a deprecation warning that can make building processes crash.
Even more so as the lowest Gradle edition to be used was 5.1.1for Unity 2019 LTS (see Gradle versions) while the warning was already saying that it would (will) be deprecated for Gradle 5.0… while the Player Settings in 2021 LTS still allows you to uncheck R8 (sets the property to false).
i have the same issue with an Ar Android application and not an XR apllication so can you help me?