2020-02-12 12:14:32 +01:00
|
|
|
# Android Build
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
## Prerequisites
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
You need the Android Native Development Kit (NDK) installed. See
|
|
|
|
[here](https://developer.android.com/ndk) to download it.
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2022-09-26 14:47:05 +02:00
|
|
|
This project is tested against Android NDK version r25.
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2022-09-26 14:47:05 +02:00
|
|
|
If you installed version r25 all you have to do is to expose the NDK root
|
2020-02-12 12:14:32 +01:00
|
|
|
directory as environment variable, e.g:
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2022-09-26 14:47:05 +02:00
|
|
|
export ANDROID_NDK_ROOT=$HOME/android-ndk-r25
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
If you installed another version you have to expose the NDK root directory as
|
|
|
|
well as the NDK version, e.g:
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
export ANDROID_NDK_ROOT=$HOME/android-ndk-r17c
|
|
|
|
export NDK_VERSION=android-ndk-r17c
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
To specify the minimum sdk version set the environment variable below:
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
export MIN_SDK_VERSION=21 # Default value if unset
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 21:49:25 +01:00
|
|
|
To specify the prefix directory set the environment variable below:
|
|
|
|
|
|
|
|
export ANDROID_BUILD_DIR=./builds/android/prefix/<android_arch> # Default value if unset
|
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
## Build
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
In the android directory, run:
|
2016-03-18 13:54:20 +01:00
|
|
|
|
2020-02-12 12:14:32 +01:00
|
|
|
./build.sh [ arm | arm64 | x86 | x86_64 ]
|