Failed to Resolve: Com.Android.Support:Appcompat-V7:26.0.0

Failed to resolve: com.android.support:appcompat-v7:26.0.0

To use support libraries starting from version 26.0.0 you need to add Google's Maven repository to your project's build.gradle file as described here: https://developer.android.com/topic/libraries/support-library/setup.html

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

For Android Studio 3.0.0 and above:

allprojects {
repositories {
jcenter()
google()
}
}

Failed to resolve: com.android.support:cardview-v7:26.0.0 android

Starting from version 26 of support libraries make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint.

Something like;

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

Could not resolve com.android.support:appcompat-v7:26.1.0 in Android Studio new project

Finally I fixed the problem by modifying build.gradle like this:

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
minSdkVersion 16
targetSdkVersion 26
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
}

I've removed these lines as these will produce more errors:

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

Also I had same problem with migrating an existing project from 2.3 to 3.0.1 and with modifying the project gradle files like this, I came up with a working solution:

build.gradle (module app)

android {
compileSdkVersion 27
buildToolsVersion "27.0.1"

defaultConfig {
applicationId "com.mobaleghan.tablighcalendar"
minSdkVersion 16
targetSdkVersion 27
}

dependencies {
implementation 'com.android.support:appcompat-v7:25.1.0'
implementation 'com.android.support:design:25.1.0'
implementation 'com.android.support:preference-v7:25.1.0'
implementation 'com.android.support:recyclerview-v7:25.1.0'
implementation 'com.android.support:support-annotations:25.1.0'
implementation 'com.android.support:support-v4:25.1.0'
implementation 'com.android.support:cardview-v7:25.1.0'
implementation 'com.google.android.apps.dashclock:dashclock-api:2.0.0'
}

Top level build.gradle

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

allprojects {
repositories {
google()
jcenter()
}
}

Android studio - Faild to resolve: com.android.support:design:26.0.1 error

Try to Change

buildToolsVersion "26.0.0"

and

com.android.support:design:26.0.0

Or not change into bulidToolsVersion Change dependencies

compile 'com.android.support:design:26.0.0-alpha1'

Error:(39, 13) Failed to resolve: com.android.support:appcompat-v7:26.0.0

Add this to your project level build.gradle file:

repositories {
maven {
url "https://maven.google.com"
}
}


Related Topics



Leave a reply



Submit