Skip to content

Building on the Command Line

avuton edited this page Jul 23, 2014 · 9 revisions

These notes are intended to help with compiling MPDroid from the command line.

Last updated 15/01/2014, with versionCode at 41.

This tutorial was written for Linux, and should work for any flavour of Debian/Ubuntu/.. The assumption here, of course, is that you're already comfortable on the command line.

  1. Stuff you need
aptitude install openjdk-7-jdk git

You will also need the Android SDK. As you'll see in step 3, this is currently API version 19+. If this document is not updated, you'll probably need the latest SDK since MPDroid should always be compiled with it.

In the SDK manager, you should install :
  • Android Tools
  • Android Build-Tools
  • Android Platform-Tools
  • SDK Platform (of the required version)
  • Android Support Repository

Ensure the SDK tools and platform-tools directories are in your $PATH and that $ANDROID_HOME is set.

If you are on a 64 bit system, you need to install the required 32 bit libs. Since the packages varies from a distro to another, here is what should be done on Ubuntu 13.10 : http://mem0ryleak.tumblr.com/post/64617476512/fix-android-adb-on-ubuntu-13-10-64bit

Please find instructions for making the Android sdk work on your configuration, as I (sadly) can't provide them all.

  1. Get the code from github
git clone https://github.com/abarisain/dmix.git

Our base directory contain these files/folders:

JMPDComm           (open source library for communicating with MPD)
JmDNS              (a Bonjour compatible multi-cast DNS discovery library)
LICENSE
MPDroid            (the MPDroid Android project)
README.md
Screenshots
Website
icons
  1. Build MPDroid.
> ./gradlew build

The output from this should be BUILD SUCCESSFUL.

  1. Install your debug APK. (Make sure your phone is connected!)

This command will rebuild and install directly:

> ./gradlew installDebug

Or alternatively, you can use the Android tools to install:

> adb install MPDroid/build/MPDroid-debug-unaligned.apk

Additionally, you can uninstall (in order to reinstall) using this command:

> adb uninstall com.namelessdev.mpdroid
Clone this wiki locally