Skip to main content

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

1

Clone the repository

Clone the Wire Android repository along with its submodules. The Kalium submodule is required for the build.
git clone https://github.com/wireapp/wire-android.git
cd wire-android
git submodule update --init --recursive
If you skip git submodule update --init --recursive, the build will fail because Kalium — the core cryptography and networking library — will not be initialized.
2

Create local.properties

Create a local.properties file in the project root pointing to your Android SDK installation.
sdk.dir=/Users/YOUR_USER_FOLDER/Library/Android/sdk
You also need to create the same file for the Kalium submodule, since Android Studio does not create it automatically:
cp local.properties kalium/local.properties
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.
3

Build the app

Use the Gradle wrapper to compile the project. No separate Gradle installation is required.
./gradlew compileApp
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.
TaskDescription
compileAppCompiles the Wire Android client
assembleAppAssembles the Wire Android client (produces an APK)
runAppAssembles and runs the app on a connected device
runUnitTestsRuns all unit tests
runAcceptanceTestsRuns all acceptance tests on a connected device
testCoverageGenerates a test code coverage report
staticCodeAnalysisRuns static code analysis on the codebase
# Compile only
./gradlew compileApp

# Build and install on connected device
./gradlew runApp

# Run unit tests
./gradlew runUnitTests

# Build a specific flavor and build type directly
./gradlew assembleStagingDebug
runAcceptanceTests and runApp require a connected Android device or running emulator.

Import into Android Studio

1

Open Android Studio

Launch Android Studio and choose File > Open (or Open an existing project from the welcome screen).
2

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.
3

Wait for sync

Android Studio will download dependencies and sync the project. This may take several minutes on first import.

Keeping the submodule up to date

If your build breaks after pulling new commits, the Kalium submodule reference may have changed. Update it with:
git submodule update --remote --merge

Common first-time setup issues

The most common cause is an uninitialized Kalium submodule. Run:
git submodule update --init --recursive
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:
cp local.properties kalium/local.properties
Your local Kalium submodule reference may be out of date. Update it:
git submodule update --remote --merge
The default JVM heap for Gradle is set to 6 GB in gradle.properties:
org.gradle.jvmargs=-Xmx6G -XX:+UseParallelGC -XX:MaxMetaspaceSize=2g
If your machine has less memory, reduce the -Xmx value, though build times may increase.

Build docs developers (and LLMs) love