refer to https://www.docs.o3de.org/docs/user-guide/platforms/android/generating_android_project_windows/
This HowTo was tested with Java runtime version 11, Android SDK platform 30, gradle plugin version 7.3.1 and Android native API level 30
To build AutomatedTesting for Android
- Set your
JAVA_HOMEto where Android Studio has it installed
set JAVA_HOME="C:\Program Files\Android\Android Studio\jbr"- Generate the Android Studio project with
generate_android_project.py
cd o3de
.\python\python.cmd cmake\Tools\Platform\Android\generate_android_project.py --engine-root f:\git\o3de-dev-worktree --build-dir build\android --third-party-path f:/git/3rdparty --project-path AutomatedTesting --android-sdk-path c:\Users\username\AppData\Local\android\Sdk --gradle-plugin-version 7.3.1 --android-sdk-platform 30 --android-native-api-level 30 --enable-unity-build --include-apk-assets --asset-mode LOOSE- Open Android Studio and load the generated project in
build/android - Wait for Gradle to do any processing, then connect your device and press the Run/Play button
The generated .apk should be in the build\android\app\build\intermediates\apk\profile folder. If you try to run the deploy_android.py script it will look for the .apk in the build\android\app\build\outputs\apk\profile folder and you may have to manually copy it there.