Failed to resolve: com.android.support:design-v7:27.1.1

前端 未结 6 1716
故里飘歌
故里飘歌 2021-01-19 06:09

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

6条回答
  •  盖世英雄少女心
    2021-01-19 06:52

    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.

提交回复
热议问题