Skip to content

Building the Android App

For building the debug build of the android app, you'll also need the two dependencies votepeer-library and libbitcoincashkotlin.

If you are building the release build, a pre-built version of these dependencies will be downloaded as part of the build. To do the release build, simply run ./gradlew assembleRelease.

In this doc we'll focus on doing the debug build for developers.

Before building

Clone the three projects in the same directory.

git clone
git clone
git clone

The relative path to each project is configured in settings.gradle.

Configure your SDK path by creating a file named in the Android app project root. It should look similar to this:

## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Mar 26 15:37:10 CET 2021

If you wish to add support for anonymous voting, you'll need to build with ring signature support. This requires more dependencies, see build guide for libbitcoincashkotlin for details. Add the following to enable ring signature support: ringsignature=true

If the build system is not finding your cmake installation, you can also explicitly add it to this file. Example:


With INTELLIJ/Android studio

If you prefer to attempt the above within Android Studio, here is how to:

Navigate to File -> Project form version control, type in

Make sure Project SDk is added user project.

File-> Project structure -> Project settings -> Project

Make sure the latest Android SDK is selected under Project SDK

Setup up Firebase

Follow this tutorial to setup a firebase project and retrieve a google-services.json file

add google-service.json file to: app/google-services.json


This project uses ktlint linter and code formatter. If using Android Studio, to make Intellij IDEA's built-in formatter produce ktlint-compatible code, run this once:

./gradlew ktlintApplyToIDEAProject


Android studio and cache

Android Studio is known for bad cache invalidation behavior causing build trouble. If you changed any of the settings above and get build issues, try removing its the cache.

File -> Invalidate caches... -> Invalidate cashes and restart

Building the project

From console, run ./gradlew build.

From android studio, in Run/Debug Configuration, add a Gradle task, set build as task.

Other tasks

Task Description
ktlint  Run linter and report errors
ktlintFormat  Run linter and attempt to fix errors
 test  Run unit tests

Instrumental tests

See VotePeer Android instrumental tests.