Find answers to common questions about mkapk
mkapk is a lightweight Android build tool designed for Termux. It allows you to compile Android apps (APKs) directly on your Android device without the overhead of cross-compilation. It supports Java, Kotlin, C++, C, and other languages through an extensible plugin system.
mkapk is designed specifically for Termux on Android and may not work on other platforms. It relies on Android-specific paths and tools that are only available in Termux.
Yes, mkapk is free and source-available (not open-source). You can view the source code on GitHub and contribute to the project via Issues.
mkapk itself is relatively small (~730KB), but you need storage for:
A minimum of 1-3 GB free storage is recommended.
Build time depends on project size and device specifications:
mkapk uses incremental compilation to speed up subsequent builds dramatically.
Debug builds: Include debugging symbols, unoptimized, faster to build, larger file size.
Release builds: Optimized, obfuscated (R8), signed, smaller file size, slower to build.
Use debug for development and release for distribution.
Use the -ndk-all flag to build for all supported architectures:
mkapk build -ndk-all
This creates split APKs for armv7, arm64, x86, and x86_64, plus a universal APK.
Yes! mkapk supports C++ (and C) through native compilation. Configure native targets in config.json and write your C++ code in the src/C++ directory. See the Advanced Guide for details.
Built-in support: Java, Kotlin, C, C++
Through plugins: Any language which compiles to JVM bytecode or machine code, via the plugin system.
Yes! mkapk automatically uses R8 (successor to ProGuard) for release builds. Provide ProGuard rules in proguard-rules.pro or disable obfuscation with -no-obs flag.
Several techniques:
Ensure your SDK_ROOT and TARGET_SDK are correctly set in config.json.
mkapk automatically restarts the daemon. If issues persist, run mkapk clean to reset build state and try again.
Build logs are printed to the console. For detailed compilation output, check the individual tool outputs.
Yes! mkapk has an extensible plugin system. See the Plugin Reposirory for detailed instructions on creating and signing plugins.
Yes, mkapk uses cryptographic verification (SHA256 + RSA) to ensure plugin integrity. Only signed plugins from trusted sources should be installed.