I tried to open an old project in a recently installed Android studio (today), it gave me this error:
failed to find build tools revision 23.0.0 rc2
install build tools 23.0.0 rc2 and sync project
I searched it online and I tried adding it to the gradle file:
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
}
And that gave me another error:
gradle DSL method not found: 'android()'
possible causes:
the project may be using a version of gradle that does not contain the method.
gradle settings.
the build file may be missing a gradle plugin.
apply gradle plugin.
this is my gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
}
source
share