Failed to resolve: com.android.support:appcompat-v7 24.0.1
You can also write like this:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
try
compile 'com.android.support:appcompat-v7:24.2.1'
EDIT
For sdk 27
buildToolsVersion "27.0.3"
implementation "com.android.support:appcompat-v7:27.1.1"
Try adding jcenter
like this way
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
}
Rather than
repositories {
jcenter()
}