This PR is the third and final piece of the basic Android support puzzle - it depends on #16110 and is related to #16883. It introduces an android
directory under qt
and a simple way to build an Android package of bitcoin-qt
:
- Build depends for Android as described in the README
- Configure with one of the resulting prefixes
- Run
make && make apk
insrc/qt
The resulting APK files will be in android/build/outputs/apk
. You can install them manually or with adb. One can also open the android
directory in Android Studio for that integrated development and debugging experience. BitcoinQtActivity
is your starting point.
Under the hood makefile apk
target:
- Renames the
bitcoin-qt
binary tolibbitcoin-qt.so
and copies it over to a folder underandroid/libs
depending on which prefix and corresponding ABIbitcoin-qt
was built for - Takes
libc++_shared.so
from the Android NDK and puts in the same place. It must be included in the APK - Extracts Qt for Android Java support files from the
qtbase
archive independs/sources
toandroid/src
There is also just a tiny bit of ifdef
’d code to make the Qt Widgets menus usable. It’s not pretty but it works and is a stepping stone towards #16883.