Skip to content

Compile Android Remote

John Maguire edited this page Oct 2, 2026 · 5 revisions

1. Prerequisites

  • JDK 17 or later (CI uses 21)
  • git
  • The Android SDK, with the Android 17 (API 37) platform. The easiest way to get it is Android Studio, which also installs a JDK.

Tell Gradle where the SDK is: set ANDROID_HOME, or put sdk.dir=/path/to/sdk in local.properties (Android Studio does this for you). Everything else, including the protocol buffer compiler, comes from Gradle.

2. Get the source

git clone https://github.com/clementine-player/Android-Remote.git

3. Build

The app has two flavors, which differ only in their application ID: fdroid (de.qspool.clementineremote, for F-Droid and GitHub releases) and play (org.clementine_player.remote, for Google Play). For a debug APK:

./gradlew assembleFdroidDebug

It's written to app/build/outputs/apk/fdroid/debug/ClementineRemote-fdroid-debug.apk. Install it on a connected phone or emulator with ./gradlew installFdroidDebug.

To build a signed release APK, copy app/key.properties.sample to app/key.properties, fill in your keystore, and run ./gradlew assembleFdroidRelease. (The project's own releases are built and signed by CI: see RELEASING.md.)

4. Test

What CI runs on every pull request:

./gradlew lintFdroidDebug testFdroidDebugUnitTest assembleFdroidDebug
  • Unit tests (app/src/test) run on the JVM, with Robolectric for the screens.
  • Device tests (app/src/androidTest) need an emulator or phone: ./gradlew connectedFdroidDebugAndroidTest. CI runs them on Android 16 and Android 17 emulators. The tests that need a Clementine skip themselves without one.
  • Integration tests drive the app's connection code against a real, headless Clementine in Docker. clementine-it/README.md explains how to run them.

5. Android Studio

Open the project directory (File → Open). Android Studio imports the Gradle build; pick the fdroidDebug build variant to run the app.

Clone this wiki locally