Errors while Launching to Android [Oculus]

so i got a bit deep in this error so it would probably be more efficient for me to work on this by myself but i wanted to record what’s going on as far as i understood it.

  1. so first of all when i try to launch on UE4, the software gives an error about Android

UATHelper: Packaging (Android (ATC)): ERROR: cmd.exe failed with args /c “D:\unrealtest\m1\Intermediate/Android/APK\gradle\rungradle.bat” :app:assembleDebug

  1. when i googled that, this article was what i found: ERROR: cmd.exe failed with args - Platform & Builds - Unreal Engine Forums
    some replies that made the most sense are about Android SDK settings in Android Studio. some recommend to uninstall and install a specific version of the product.
  2. i did that as well and went through the Android Setup for Quest steps on UE4 website: Setting Up Android SDK and NDK for Unreal | Unreal Engine Documentation
    when i went through the steps, the 3rd step involves opening the file SetupAndroid and accepting the Android SDK Agreement but when i try to do that, i get this error: Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
    at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
    at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
    at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
    at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
    Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 5 more
  3. So when I googled that error, i found this page: Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema" - Stack Overflow
    -i did try uninstalling and installing java but nothing changed.
    -so i tried the second most popular respond for that question but what happened was when i commanded flutter doctor in command prompter it says that that is not a recognized command.so now i am a bit deeper in the error.
    i have two internal harddisks and the programs are distributed to both of them -incl. Epic Games, Android and Java but I don’t know why that would be a problem.

nothing works… please help…

1 Like

I am trying to set up for Quest development but I get the same error, when I double click the SetupAndroid.bat file
Does anyone know what is the problem?

So I tried A LOT OF things but I believe at the end I just uninstalled every software about Android Platform Packaging again and followed this youtube tutorial: UNREAL ENGINE 4.25.1 PACKAGING FOR ANDROID TUTORIAL UPDATED! - YouTube

I am still having errors when I try to build but the error is different, so I believe I at least overcame these errors about Android…