Compilation on Android
Install Android Studio
We need to create an Android System Root for compilation, therefore, the suggested platform is Linux. We describe the environment settings in Linux only.
Android environment settings in Linux
.bashrc requires the following settings:
export ANDROID_NDK_ROOT=/CIOS/Android/NDK
export ANDROID_SDK_ROOT=/CIOS/Android/SDK
export ANDROID_SYS_ROOT=/CIOS/Android/SYS
Preparation for Android compilation environment
Create an Android System Root
Script to create an Android System Root as following:
#!/bin/sh
export ANDROID_SYS=/CIOS/Android/SYS
export ANDROID_PLATFORM=android-15
export ANDROID_TOOLCHAIN=arm-linux-androideabi-4.9
$ANDROID_NDK_ROOT/build/tools/make-standalone-toolchain.sh \
--platform=$ANDROID_PLATFORM \
--toolchain=$ANDROID_TOOLCHAIN \
--install-dir=$ANDROID_SYS