Failed To Resolve: Com.android.support:design-v7:27.1.1
I am using Android Studio 3.1.3. Gradle build sync failed. I used following method but there is no use of it. If there is any solution please tell me maven { url 'https://maven.go
Solution 1:
First make sure that you using:
targetSdkVersion 27
compileSdkVersion 27
buildToolsVersion '27.0.3'
And your gradle be like:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
//..
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
//..
}
}
And also update design implementation like below:
implementation 'com.android.support:design:27.1.1'
You get this error because com.android.support:design-v7 does not exist it exist without -v7, also you can check support libraries in this link any time to make sure you are using the correct library.
Solution 2:
You should add google()
repository to your dependencies
allprojects {
repositories {
google()
jcenter()
}
}
Solution 3:
Don't
implementation 'com.android.support:design-v7:27.1.1'
buildToolsVersion '27.1.1'
Do
implementation 'com.android.support:design:27.1.1'
buildToolsVersion '27.0.3'
Make sure, you added below
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com/' }
}
}
Then Clean-Rebuild-Build
.
Solution 4:
Add the maven URL in all projects section as well and sync the gradle or try removing one by one external libraries and sync the gradle hope it helps
allprojects { repositories { google() jcenter()maven :"http://www.google.com" } }
Solution 5:
this is the correct form implementation 'com.android.support:design:27.1.1'
Post a Comment for "Failed To Resolve: Com.android.support:design-v7:27.1.1"