This guide is based on Android 188.8.131.52 and NDK version r10e. The Android builds require GCC 4.9 which is in NDK r10e.
To follow this guide, you must first ensure you have completed the Getting Android Studio and Orx step. repository step.
1. Compile orx
cd <DEV_FOLDER>/orx/code/build/android ndk-build ./install.sh For windows, use install.bat instead.
2. Compile orxTest sample
cd <DEV_FOLDER>/orx/code/demo/android/app/src export NDK_MODULE_PATH=<DEV_FOLDER>/orx/code ndk-build For windows, substitute the export command above as: set NDK_MODULE_PATH=<DEV_FOLDER>\orx\code
3. Import Orx Library project into Android Studio.
The purpose of this step is to optionally create an updated version of the Orx Library to be used by Demo Project, or your own project.
1. Load Android Studio 2. Choose "Import project (Eclipse ADT, Gradle, etc)" 3. Browse to <DEV_FOLDER>/orx/extern/android
If no issues, the library will build automatically and can be found at: <DEV_FOLDER>/orx/extern/android/orx-lib/build/outputs/aar
A precompiled orx-lib is included with the Demo Project. However, you can always take this one above you compiled yourself, and copy it over the existing one in the demo project at: <DEV_FOLDER>/orx/code/demo/android/app/aars
4. Import the Demo Project into Android Studio
Click "Import an existing project" with Android Studio Browse to <DEV_FOLDER>/orx/code/demo/android
After a successful project load, it will build files automatically at: <DEV_FOLDER>/orx/code/demo/android/app/build
Then finally, turn those files into a working APK by selecting Run App. Cancel any Emulator window that opens. An APK or two will be generated at: <DEV_FOLDER>/orx/code/demo/android/app/build/outputs/apk
Now you can copy this APK to your Android device and run the demo.
If you have completed this tutorial and would like to try it with your own project, continue to Using the Android demo as a template for your own projects.