aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-11-16 10:05:02 +0800
committerfanquake <fanquake@gmail.com>2021-11-16 10:05:17 +0800
commit6780759a01e25c68dd55044c3b9a016f9137910b (patch)
tree0ec5211e5937d4a227e908011823cf6a9e2f0498 /doc
parent41e6909c073024e774e5f960f00ebd74758e9d2e (diff)
parent4ba492052ec09d48f8c3f391cc248340e761c7f2 (diff)
downloadbitcoin-6780759a01e25c68dd55044c3b9a016f9137910b.tar.xz
Merge bitcoin/bitcoin#23478: build: Add support for Android NDK r23 LTS
4ba492052ec09d48f8c3f391cc248340e761c7f2 doc: Add minimum supported Android NDK version (Hennadii Stepanov) 6393bdcd53b106367b10317c227a114494c90142 doc: Move Android dependencies guide into `build-android.md` (Hennadii Stepanov) ac323a7222efaafc7bc3110b02f1ef2d2635c9a2 build: Switch to llvm buinutils for Android builds (Hennadii Stepanov) Pull request description: The new Long Term Support release of the Android NDK is [available](https://groups.google.com/g/android-ndk-announce/c/MS6Qoub0DKE/m/Zfp5Ys8eAAAJ) since 2021-08-11: > As r23 is the new LTS, the support windows for r21 and r22 have now ended. On master (8ae4ba481ce8f7da173bef24432729c87a36cb70), dependency build fails because it expects GNU Binutils are present in the Android NDK. In [fact](https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#binutils): > GNU Binutils remains available up to and including r22. All binutils tools with the exception of the assembler (GAS) were removed in r23. GAS was removed in r24. This PR switches our depends build system to llvm binutils. The usage of `llvm-ar` and `llvm-ranlib` tools effectively makes r21 the minimum supported version of NDK. With this PR: - building depends against NDK r23 LTS now is possible with `NO_QT=1` - building the `qt` package in depends against NDK r23 LTS still fails: ``` Creating qmake... ... ERROR: Cannot detect Android NDK toolchain. Please use -android-toolchain-version to specify it. ``` The issue with the `qt` package is going to be addressed in another PR. ACKs for top commit: fanquake: ACK 4ba492052ec09d48f8c3f391cc248340e761c7f2 Tree-SHA512: cdc8f95ff9a3ad7f12eb55b9ea18b6b6b800d4cceff7e0321985be6e39d15a2b2ea5b1592972307d76d111292a0ed58fd287e5ca285e2f6868b42a286536d310
Diffstat (limited to 'doc')
-rw-r--r--doc/build-android.md17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/build-android.md b/doc/build-android.md
index 7a8a9e6a65..6d25e72fde 100644
--- a/doc/build-android.md
+++ b/doc/build-android.md
@@ -3,9 +3,22 @@ ANDROID BUILD NOTES
This guide describes how to build and package the `bitcoin-qt` GUI for Android on Linux and macOS.
-## Preparation
-You will need to get the Android NDK and build dependencies for Android as described in [depends/README.md](../depends/README.md).
+## Dependencies
+
+Before proceeding with an Android build one needs to get the [Android SDK](https://developer.android.com/studio) and use the "SDK Manager" tool to download the NDK and one or more "Platform packages" (these are Android versions and have a corresponding API level).
+
+The minimum supported Android NDK version is [r21](https://github.com/android/ndk/wiki/Changelog-r21).
+
+In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending on the platform the build is being performed on) need to be set.
+
+API levels from 24 to 29 have been tested to work.
+
+If the build includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK` need to be set as well but can otherwise be omitted.
+This is an example command for a default build with no disabled dependencies:
+
+ ANDROID_SDK=/home/user/Android/Sdk ANDROID_NDK=/home/user/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
+
## Building and packaging