diff options
author | Tobrun <tobrun@mapbox.com> | 2017-03-31 15:11:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 15:11:20 +0200 |
commit | 05992c47aca0c83d5c0abc79c8e7833d69d24803 (patch) | |
tree | 830107031aec50efe2fe46b2377bf96c4aaa8a58 /platform/android/DISTRIBUTE.md | |
parent | 83d22a5bd4f245dbd6893f68ff6a2298d6064922 (diff) | |
download | qtlocation-mapboxgl-05992c47aca0c83d5c0abc79c8e7833d69d24803.tar.gz |
[android] - update getting started and distribution docs (#8412)
* [android] - update project documentation
* add linux instructions
Diffstat (limited to 'platform/android/DISTRIBUTE.md')
-rw-r--r-- | platform/android/DISTRIBUTE.md | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/platform/android/DISTRIBUTE.md b/platform/android/DISTRIBUTE.md index e7df5650f1..648f26ce25 100644 --- a/platform/android/DISTRIBUTE.md +++ b/platform/android/DISTRIBUTE.md @@ -1,21 +1,30 @@ # Distributing Mapbox GL Native for Android -Depending on your use case, you may want to support all or just a subset of [Android ABIs](http://developer.android.com/ndk/guides/abis.html). -This can be achieved using the different `Makefile` targets that are available. +Depending on your use case, you may want to support all or just a subset of [Android ABIs](http://developer.android.com/ndk/guides/abis.html). This document covers building an `.aar` file from the Mapbox Android SDK and building `.so` files for specific ABIs. In normal circumstances an application developer will use [APK splits](https://developer.android.com/studio/build/configure-apk-splits.html) to optimize this at application level. -##### Build native libraries for all supported ABIs +##### Build types + +With a `BUILDTYPE` var you can specify the build type for the `.so` and `.aar` files: + +```bash +BUILDTYPE=Debug or BUILDTYPE=Release +``` + +##### Creating an Android Archive file that supports all ABIs ```sh -make apackage +BUILDTYPE=RELEASE make apackage ``` This will build native libraries to support following ABIs: - - armeabi - - armeabi-v7a - - arm64-v8a - - x86 - - x86_64 - - mips +- armeabi +- armeabi-v7a +- arm64-v8a +- x86 +- x86_64 +- mips + +After succesfully finish building the native libraries, gradle will build the MapboxAndroidSDK module and generate an Android Archive file in `MapboxAndroidSDK/build/outputs/aar `. The packaged native libraries can be found in `MapboxAndroidSDK/src/main/jniLibs/<abi>`. ##### Build native libraries for a specific ABI @@ -26,13 +35,13 @@ make android-lib-%% In the command above you'll need to replace `%%` with an ABI key listed below: | ABI Key | Android ABI | -|---------|-------------| -| arm-v5 | armeabi | -| arm-v7 | armeabi-v7a | -| arm-v8 | arm64-v8a | -| x86 | x86 | -| x86-64 | x86_64 | -| mips | mips | +| ------- | ----------- | +| arm-v5 | armeabi | +| arm-v7 | armeabi-v7a | +| arm-v8 | arm64-v8a | +| x86 | x86 | +| x86-64 | x86_64 | +| mips | mips | For example, to build the arm64-v8a ABI the Makefile target would be: |