Skip to content

Instantly share code, notes, and snippets.

@AMZN-alexpete
Last active October 10, 2023 01:22
Show Gist options
  • Select an option

  • Save AMZN-alexpete/a332b5d4fde70dba31f78e435ed7a884 to your computer and use it in GitHub Desktop.

Select an option

Save AMZN-alexpete/a332b5d4fde70dba31f78e435ed7a884 to your computer and use it in GitHub Desktop.
O3DE Android HowTo

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

  1. Set your JAVA_HOME to where Android Studio has it installed
set JAVA_HOME="C:\Program Files\Android\Android Studio\jbr"
  1. 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
  1. Open Android Studio and load the generated project in build/android
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment