Updated to work with the latest Android Studio.