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

  1. Configuration
    Can check ue official configuration requirements for different versions

    https://docs.unrealengine.com/5.0/zh-CN/android-development-requirements-for-unreal-engine/
    Image Description

  2. Configure Environment
    My java environment is 12.0.2 satisfying 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:

    https://developer.android.google.cn/studio

2.2 After downloading studio we need to configure sdk
Image Description

Image Description
Image Description
This position is mainly for calling ue5’s own configuration script later
Image Description

  1. 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
  • Image Description
  • 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
    Image Description
  • Replace two lines in picture
    Image Description
  1. Run file

  2. Open UR5 VR project run packaging

  3. Enter project settings -> Android SDK Check if java version is consistent with computer
    6.1 Can check version via console input java -version and javac -version and keep consistent with UE5
    Image Description
    Image Description

  4. 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 is F:\Android\Sdk\ndk\21.4.7075529. Some tutorials might stop at ndk folder. Reason can check official documentation

    https://forums.unrealengine.com/t/platform-android-is-not-a-valid-platform-to-build-check-that-the-sdk-is-installed-properly/511950/4

  5. At this time still will report SDK not installed here ignore reason, click continue will generate successfully