From cea55c931d40d00e09bb49963ab9512953e5dfa8 Mon Sep 17 00:00:00 2001 From: Kangping Dong Date: Wed, 27 Mar 2024 16:28:45 +0800 Subject: [PATCH] [docs] update the Android build guide to set up NDK Fixes issue: https://github.com/openthread/ot-commissioner/issues/243 --- android/BUILDING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/BUILDING.md b/android/BUILDING.md index f34995d6b..88a311b65 100644 --- a/android/BUILDING.md +++ b/android/BUILDING.md @@ -6,6 +6,7 @@ This document describes how to build the OT Commissioner Android App. - macOS or Linux computer. - Install latest Android Studio from [here](https://developer.android.com/studio). +- Install Android NDK by following https://developer.android.com/studio/projects/install-ndk#default-version ## Bootstrap @@ -21,9 +22,12 @@ The Commissioner Android App is built on top of the native OT Commissioner libra ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle ./build-commissioner-libs.sh ``` -This script creates a build directory (`.build-${ANDROID_ABI}`) in the current directory and copies generated libraries into target sub-folders in `openthread_commissioner`. +> Note: +> +> 1. you need to set env `ANDROID_ABI` to the ABI of your phone. This value can be got with command `adb shell getprop ro.product.cpu.abi` after connecting the phone to your computer. +> 2. you need to set `ANDROID_NDK_HOME` to your Android NDK directory. This is typically `$HOME/Android/sdk/ndk/xx.x.xxxxx` (where `xx.x.xxxxx` is the NDK version) on Linux and Mac OS or `$HOME/Library/Android/sdk/ndk-bundle` on older OS versions. -> Note: you need to set env `ANDROID_ABI` to the ABI of your phone. This value can be got with command `adb shell getprop ro.product.cpu.abi` after connecting the phone to your computer. +This script creates a build directory (`.build-${ANDROID_ABI}`) in the current directory and copies generated libraries into target sub-folders in `openthread_commissioner`. ## Build the App with Android Studio