The whole step borrowed article
https://blog.csdn.net/weixin_44350205/article/details/119233809
But still reported error. I organize and record my own steps
- Configuration
Can check ue official configuration requirements for different versionshttps://docs.unrealengine.com/5.0/zh-CN/android-development-requirements-for-unreal-engine/

- Configure Environment
My java environment is12.0.2satisfying requirements, because installed before so no need to reinstall here. If need to configure can follow online environment configuration
2.1 Configure ios studio
Downloading ide is mainly to use ide to generate project. studio download address:
2.2 After downloading studio we need to configure sdk


This position is mainly for calling ue5’s own configuration script later
- Configure android sdk info in ue5
Here refer to first link or official link for configuration
https://docs.unrealengine.com/4.27/zh-CN/SharingAndReleasing/Mobile/Android/Setup/AndroidStudio/
If using official configuration file report error Unable to locate sdkmanager.bat.
- Go to system environment variables to add Sdk path

- Modify bat file, modify sdk path and sdkmanager.bat file path to fixed path. sdkmanager path is different according to your UE5 installation location. Mine is at
E:\Program Files\Epic Games\UE_5.0\Engine\Extras\Android
- Replace two lines in picture

Run file
Open UR5 VR project run packaging
Enter project settings -> Android SDK Check if java version is consistent with computer
6.1 Can check version via console inputjava -versionandjavac -versionand keep consistent with UE5

If middle report error
Platform Android is not a valid platform to build. Check that the SDK is installed properly., modify ndk path in above step to version number path. My path isF:\Android\Sdk\ndk\21.4.7075529. Some tutorials might stop at ndk folder. Reason can check official documentationAt this time still will report SDK not installed here ignore reason, click continue will generate successfully
