Warning, /graphics/krita/README.android.md is written in an unsupported language. File is not indexed.

0001 # Building Krita for Android
0002 
0003 First of all, I use linux to do my builds and testing. Although,
0004 they _should_ work on Windows/macOS, I cannot give any guarantee 
0005 that it will.
0006 
0007 ## Setting up Android SDK and NDK
0008 
0009 We right now use Android NDK version `r18b` to do our builds. So,
0010 I would recommend to use that. Download it from [google's website](https://developer.android.com/ndk/downloads/older_releases.html)
0011 then extract it.
0012 
0013 Next, Android SDK. You can either download Android Studio or just
0014 the `sdk-tools`. Both could be downloaded from [google's website](https://developer.android.com/studio).
0015 
0016 If you downloaded Android Studio then open SDK manager and download
0017 `Android SDK Build-Tools`.
0018 (more info: https://developer.android.com/studio/intro/update#sdk-manager)
0019 
0020 If you download just `sdk-tools`, then, extract it and run:
0021 
0022 ```shell
0023 cd <extracted-android-sdk-tools>/tools/bin
0024 ./sdkmanager --licenses
0025 ./sdkmanager platform-tools
0026 ./sdkmanager "platforms;android-21"
0027 ./sdkmanager "platforms;android-28"    # for androiddeployqt
0028 ./sdkmanager "build-tools;28.0.2"
0029 ```
0030 
0031 If you get some `ClassNotFoundException` it might be because `java`
0032 version is set to `11`. For `sdkmanager` to work, set it to `8` and
0033 then run it again.
0034 
0035 That's the only dependency we have to manage manually!
0036 
0037 ## Building Krita
0038 
0039 Now, to build krita, run `<krita-source>/packaging/android/androidbuild.sh --help`
0040 and pass the required arguments.
0041 
0042 Example:
0043 
0044 ```shell
0045 ./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
0046 ```
0047 
0048 That's all!
0049 
0050 ## Installing Krita APK
0051 
0052 To install run `adb install -d -r <build-root>/krita_build_apk/build/outputs/apk/debug/krita_build_apk-debug.apk`.
0053 
0054 `adb` should be in `<sdk-root>/platform-tools/`
0055 
0056 ## Crash
0057 
0058 If Krita crashes you can look up the logs using `adb logcat`