Made it work well on Android Studio.
Fixed the tests and finished migrating to Gradle.