Could not find method classpath() for arguments [com.android.tools.build:gradle:4.0.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
my build.gradle:app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.g"
minSdkVersion 14
targetSdkVersion 26
versionCode 83
versionName "9.2"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
implementation 'com.google.android.gms:play-services-ads:11.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.1'
implementation 'com.android.support:support-v4:26.2.0'
}
repositories {
google()
//... others
}