Updated build files for new version of Android Studio and Gradle
Fixed a bug in board rotation