Commit da99f730 authored by Sharaf Zaman's avatar Sharaf Zaman


parent c425138e
To build for Android the first thing to do is to read the in
1) Set the neccessary environment variables
KRITA_ROOT # project root directory
QT_ANDROID # example: /opt/Qt/5.12/android_armv7/
ANDROID_API_LEVEL # example: 21 (I used 28)
PY_INCLUDE_PATH # python3 includes directory usually /usr/includes/python3.5/
PY_LIBRARY # python3 lib directory usually /usr/lib/python3.5/
2) Create three directories in build root(BUILD_ROOT): `d, i, b`
3) First we'll have to build kf5 dependencies which we use `kdesrc-build`
to do. So, run `$KRITA_ROOT/packaging/android/`.
4) `cd` to `$BUILD_ROOT/b` and run
5) Now we have to build boost.
This should build without any errors.
6) set `INSTALL_PREFIX` environment variable to install built binaries into
the directory.
(please create a new directory and use that as a location to install)
Then run `$KRITA_ROOT/packaging/android/`
7) If build is configured properly then run
make -j5
make install
ARM binary should be ready
8) Now to create APK, run and sit back as gradle can be really slow
make create-apk
Now if `adb` is in your PATH then run `make install-apk-krita`, if it is not
in your `PATH` you can add it or use this:
$ANDROID_SDK_ROOT/platform-tools/adb install -d -r krita_build_apk/build/outputs/apk/debug/krita_build_apk-debug.apk
Now if the app crashes you can use `logcat`, to see the trace.
# Building Krita for Android
First of all, I use linux to do my builds and testing. Although,
they _should_ work on Windows/macOS, I cannott give any guarentee
that it will.
## Setting up Android SDK and NDK
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 [googl'e website](
If you downloaded Android Studio then open sdk manager and download
`Android SDK Build-Tools`.
(more info:
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 "build-tools;28.0.2"
If you get some `ClasNotFoundException` 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!
## Building Krita
Now, to build krita, run `<krita-source>/packaging/android/ --help`
and pass the required arguments.
./ -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!
## Installing Krita APK
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/`
## Crash
If Krita crashes you can look up the logs using `adb logcat`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment