Adapted to Android Studio 0.6