Apk fails to build for quest 2

When i try to build for my quest 2 it fails and I get this log

what am I doing wrong?

====20/09/2023 10:35:12====PERFORMING FINAL APK PACKAGE OPERATION=====arm64===========================================
LogPlayLevel: UAT: Copying D:\GProj\grpprj08\Prototype\VrTestAaron\Intermediate\Android\arm64\AndroidManifest.xml to D:\GProj\grpprj08\Prototype\VrTestAaron\Intermediate\Android\arm64\gradle\app\src\main\AndroidManifest.xml
LogPlayLevel: UAT:
LogPlayLevel: UAT: Directory Engine/Plugins/Runtime/AndroidFileServer/Source/AndroidFileServer/…/AFSStub copied to D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/AFSProject (True)
LogPlayLevel: UAT:
LogPlayLevel: UAT: Directory Engine/Plugins/Runtime/AndroidFileServer/Source/AndroidFileServer/Android copied to D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/AFSProject/app/src/main (True)
LogPlayLevel: UAT:
LogPlayLevel: UAT: Directory D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/app/src/main/res copied to D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/AFSProject/app/src/main/res (True)
LogPlayLevel: UAT:
LogPlayLevel: UAT: Directory D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/gradle copied to D:/GProj/grpprj08/Prototype/VrTestAaron/Intermediate/Android/arm64/gradle/AFSProject/gradle (True)
LogPlayLevel: UAT: Fixing targetSdkVersion; minSdkVersion is 32 which is above targetSdkVersion 26.
LogPlayLevel: UAT:
LogPlayLevel: UAT: Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
LogPlayLevel: UAT: Making .apk with Gradle…
LogPlayLevel: UAT: To honour the JVM settings for this build a single-use Daemon process will be forked. See The Gradle Daemon.
LogPlayLevel: UAT: Daemon will be stopped at the end of the build
LogPlayLevel: UAT:
LogPlayLevel: UAT: FAILURE: Build failed with an exception.
LogPlayLevel: UAT:
LogPlayLevel: UAT: * What went wrong:
LogPlayLevel: UAT: Could not open settings generic class cache for settings file ‘Z:\settings.gradle’ (C:\Users\Aaron.gradle\caches\7.5\scripts\cl765bryjxd435mdhqx100jn3).
LogPlayLevel: UAT: > BUG! exception in phase ‘semantic analysis’ in source unit ‘BuildScript’ Unsupported class file major version 63
LogPlayLevel: UAT:
LogPlayLevel: UAT: * Try:
LogPlayLevel: UAT: > Run with --stacktrace option to get the stack trace.
LogPlayLevel: UAT: > Run with --info or --debug option to get more log output.
LogPlayLevel: UAT: > Run with --scan to get full insights.
LogPlayLevel: UAT:
LogPlayLevel: UAT: * Get more help at https://help.gradle.org
LogPlayLevel: UAT:
LogPlayLevel: UAT: BUILD FAILED in 17s
LogPlayLevel: UAT: cmd.exe failed with args /c “D:\GProj\grpprj08\Prototype\VrTestAaron\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
LogPlayLevel: UAT: (see C:\Users\Aaron\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+Unreal+UE_5.3\Log.txt for full exception trace)
LogPlayLevel: UAT: AutomationTool executed for 0h 1m 56s
LogPlayLevel: UAT: AutomationTool exiting with ExitCode=1 (Error_Unknown)
LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 55.888060
LogPlayLevel: UAT: BUILD FAILED

1 Like

Hey!
Might be worth having a look on your java and sdk/ndk setup.

These are my current, working, settings.





Hope it helps!

1 Like

Also, I’ve just noticed you’re using Unreal 5.3?
I believe that might be your main issue!

To successfuly and properly build for quest, the MetaXRplugin is a must-have.
And currently they are at 56.0 version, and It is only compatible with the latest 5.2.1 Unreal Engine version…

For a Unreal Engine 5.3 version, it might be worth checking out the github for the MetaXRplugin and check out the most recent available build, it probably runs in 5.3… but could bring some issues, since it’s still being developed and could also be a bit more difficult to implement.

Hope this also helps!

Hey,

I managed to fix it!!
turns out i was using the wrong JDK version

thanks for the replies though

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.