Prerequisites
Before you begin, install the following tools:JDK 21
Required Java Development Kit version. Earlier versions are not supported.
Android SDK
Install via Android Studio or the standalone SDK command-line tools.
Android NDK
Required for building native libraries. Install through Android Studio’s SDK Manager.
Git
Required to clone the repository and manage the Kalium submodule.
Clone and set up the project
Clone the repository
Clone the Wire Android repository along with its submodules. The Kalium submodule is required for the build.
Create local.properties
Create a You also need to create the same file for the Kalium submodule, since Android Studio does not create it automatically:
local.properties file in the project root pointing to your Android SDK installation.On macOS, the Android SDK is typically at
~/Library/Android/sdk. On Linux, it is commonly at ~/Android/Sdk. Adjust the path to match your system.Build the app
Use the Gradle wrapper to compile the project. No separate Gradle installation is required.This compiles the Wire Android client without producing an installable APK. See Available Gradle tasks below for the full list of commands.
Available Gradle tasks
All tasks are run via the Gradle wrapper (./gradlew) from the project root.
| Task | Description |
|---|---|
compileApp | Compiles the Wire Android client |
assembleApp | Assembles the Wire Android client (produces an APK) |
runApp | Assembles and runs the app on a connected device |
runUnitTests | Runs all unit tests |
runAcceptanceTests | Runs all acceptance tests on a connected device |
testCoverage | Generates a test code coverage report |
staticCodeAnalysis | Runs static code analysis on the codebase |
runAcceptanceTests and runApp require a connected Android device or running emulator.Import into Android Studio
Open Android Studio
Launch Android Studio and choose File > Open (or Open an existing project from the welcome screen).
Select the build file
Browse to the root of the cloned repository and select the
build.gradle.kts file. Android Studio will import it as a Gradle project.Keeping the submodule up to date
If your build breaks after pulling new commits, the Kalium submodule reference may have changed. Update it with:Common first-time setup issues
Build errors immediately after cloning
Build errors immediately after cloning
The most common cause is an uninitialized Kalium submodule. Run:
Missing SDK path error
Missing SDK path error
The build requires a valid SDK path in both
local.properties at the project root and kalium/local.properties. Copy the root file to fix this:Build breaks after adding commits
Build breaks after adding commits
Your local Kalium submodule reference may be out of date. Update it:
Out-of-memory errors during build
Out-of-memory errors during build
The default JVM heap for Gradle is set to 6 GB in If your machine has less memory, reduce the
gradle.properties:-Xmx value, though build times may increase.