Edit your project level build.gradle file and set gradle version to the latest version now it is 3.2.1
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}