Though I have an updated android studio I am getting the following error but I cannot find gradle 4.1 in the gradle folder but when I check file -> project structure -> grad
you can add this statement to your gradle.properties file
android.enableAapt2=false
check your tools version, it should be 3.0.1
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
please note that google()
repository is important. the newer plugin is posted there.
Try adding google()
in repositories.
For my project is correct next construction in "build.gradle":
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
Try to reinstall the android version you are using with standard settings. use stable version instead for your computer