AndroidStudio2.3.3 Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.2

To use ConstraintLayout in your project, proceed as follows:

  1. Ensure you have the "maven.google.com" repository declared in your module-level build.gradle file:

    repositories {
        maven {
            url 'https://maven.google.com'
        }
    }
    
  2. Add the library as a dependency in the same build.gradle file:

    dependencies {
        compile 'com.android.support.constraint:constraint-layout:1.0.2'
    }
    
  3. In the toolbar or sync notification, click Sync Project with Gradle Files.

猜你喜欢

转载自blog.csdn.net/czc448969530/article/details/78246918