You will need to install the target sdk v19 and Build Tools 21 packages via Android SDK manager.
Check out a fresh copy of this repository and import "As Existing Android Project" to Android Studio. When asked for whether you would like the gradle project imported as well, set the gradle project folder to PilightTesting (instead of PilightTesting/gradle). Enjoy!