Converted project to use Gradle and fixed compile error