Android Studio Error:(19, 0) Gradle DSL method not found: android()


Error:(19, 0) Gradle DSL method not found: 'android()'

Possible causes: The project 'Example' may be using a version of the Android 
Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).

Fix plugin version and sync project
The project 'Example' may be using a version of Gradle that does not contain the method.
The build file may be missing a Gradle plugin.

Apply Gradle plugin
Solution:

Just remove the following code from build.gradle file

android {
    compileSdkVersion 'android-MNC'
    buildToolsVersion 'xx.x.x'
}
dependencies {
}

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram