First of all, I use linux to do my builds and testing. Although, they should work on Windows/macOS, I cannot give any guarantee that it will.
We right now use Android NDK version r18b
to do our builds. So,
I would recommend to use that. Download it from google's website
then extract it.
Next, Android SDK. You can either download Android Studio or just
the sdk-tools
. Both could be downloaded from google's website.
If you downloaded Android Studio then open SDK manager and download
Android SDK Build-Tools
.
(more info: https://developer.android.com/studio/intro/update#sdk-manager)
If you download just sdk-tools
, then, extract it and run:
cd <extracted-android-sdk-tools>/tools/bin
./sdkmanager --licenses
./sdkmanager platform-tools
./sdkmanager "platforms;android-21"
./sdkmanager "platforms;android-28" # for androiddeployqt
./sdkmanager "build-tools;28.0.2"
If you get some ClassNotFoundException
it might be because java
version is set to 11
. For sdkmanager
to work, set it to 8
and
then run it again.
That's the only dependency we have to manage manually!
Now, to build krita, run <krita-source>/packaging/android/androidbuild.sh --help
and pass the required arguments.
Example:
./androidbuild.sh -p=all --src=/home/sh_zam/workspace/krita --build-type=Debug --build-root=/home/sh_zam/workspace/build-krita-android --ndk-path=/home/sh_zam/Android/Sdk/ndk-bundle --sdk-path=/home/sh_zam/Android/Sdk --api-level=21 --android-abi=armeabi-v7a
That's all!
To install run adb install -d -r <build-root>/krita_build_apk/build/outputs/apk/debug/krita_build_apk-debug.apk
.
adb
should be in <sdk-root>/platform-tools/
If Krita crashes you can look up the logs using adb logcat