Please exclude the file "local.properties" from version control, it prevents the project from building on systems with a different sdk path. By removing this file manually after cloning the repository, I was able to build the project just fine in Android Studio.
Btw, thanks for the example code, it was just what I was looking for!