For the core library and other common info, please refer to the Delta Chat Core Library.
When checking out deltachat-android, make sure also to check out the subproject deltachat-core-rust:
$ git clone --recursive https://github.com/deltachat/deltachat-androidor later by
git submodule update --init --recursive. If you do this in your home directory, this results in the folder
~/deltachat-androidwhich is just fine.
First, build the image
deltachat-android by running
podman build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) . -t deltachat-android
Then, run the image:
podman run --userns=keep-id -it --name deltachat -v $(pwd):/home/app -w /home/app localhost/deltachat-android
docker run -it --name deltachat -v $(pwd):/home/app -w /home/app localhost/deltachat-android
Within the container, install toolchains and build the native library:
[email protected]:/home/app$ scripts/install-toolchains.sh [email protected]:/home/app$ ./ndk-make.sh
Then, build an APK:
[email protected]:/home/app$ ./gradlew assembleDebug
If you don't want to use Docker or Podman, proceed to the next section.
To setup build environment manually, you can read the
and mimic what it does.
First, you need to setup Android SDK and Android NDK. Configure
ANDROID_NDK_ROOT environment variable to point to the Android NDK
installation directory. Currently ndk20b is the minimum required version.
Newer versions will likely work, however, are not tested and not used
in official releases, in general, changes on the ndk-version should be
done with care.
Then, install Rust using rustup. Install Rust
toolchains for cross-compilation by executing
After that, call
./ndk-make.sh in the root directory to build core-rust.
Afterwards run the project in Android Studio. The project requires API 25.
With chance, that's it :) - if not, read on how to set up a proper development environment.
Some libs required by Android Studio may be missing on 64 bit Linux machines
Source], so for Ubuntu execute
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
and for Fedora execute
$ sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686.
Download Android Studio from https://developer.android.com (android-studio-ide-...-linux.zip)
and unpack the archive which contains a single folder called
move this folder e.g. to
To launch Android Studio for the first time, open a terminal, navigate to
./studio.sh and use all the standard values
from the wizard.
Android Studio now asks you if you want to open an existing project;
~/deltachat-android as created in the "Build" chapter (Android Studio starts to
build the project, however, there are some steps missing before this will
If components are missing, click on the corresponding error message and install eg. required SDKs and the "Build-Tools" (you should also find the option at "Tools / Android / SDK Manager / SDK Platforms"). Now the build should succeed - but the app still misses the native part.
Download Android NDK from
and extract the archive containing a single folder
android-ndk-r…; move this folder e.g. to
Export the folder path to your environment as
ANDROID_NDK and add it to
You can achieve this e.g. by adding the following lines to
The user interface classes are based on the Signal messenger.
Licensed GPLv3+, see the LICENSE file for details.
Copyright © 2020 Delta Chat contributors.