Upgrade to Android Studio 3.0

After upgrading to Android Studio 3.0, many configs changed. Please check https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html for details.

Versions

Android Studio as an IDE often breaks because of the incompatiblity of these three components:

Make sure they are compatible.

In latest version as 2018/02/23,

The version for Android Studio and ` Android Plugin for Gradle` should be always the same.

Naming

com.android.feature

implementation, api, compileOnly, and runtimeOnly.

flavor dimensions