I am having this issue in Android studio.
Error:(22, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0
Install
change
compile 'com.android.support:appcompat-v7:26.0'
to
`compile 'com.android.support:appcompat-v7:26.+'`
worked for me fine.
1 - in build.gradle change my supportLibVersion to 26.0.0
2 - in app/build.gradle use :
implementation "com.android.support:appcompat v7:${rootProject.ext.supportLibVersion}"
3 - cd android
4 - ./gradlew clean
5 - ./gradlew assembleRelease
If you already use jitpack.io or any repository. You can add google repository like this:
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
Adding the below content in the main gradle has solved the problem for me:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
flatDir {
dirs 'libs'
}
}
My issue got resolved with the help of following steps:
For gradle 3.0.0 and above version
Add this in build.gradle(Project:projectname)
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
}
Add this in build.gradle(Module:app)
dependencies {
compile 'com.android.support:appcompat-v7:26.1.0'
}