Well, I met a problem about gradle sync today.
The problem is like this:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:design:27.1.0.
But I actually add the dependence in app/build.gradle
dependencies like this
dependencies {
...
implementation 'com.android.support:appcompat-v7:27.1.0'
...
implementation 'com.android.support:design:27.1.0'
...
}
I didn't turn the gradle offline mode on. And it is connected to the Internet. But it seems didn't auto download the dependence. Also other dependencies like this
implementation 'de.hdodenhof:circleimageview:2.2.0'
I can't solve it. Each answer is helpful. The detailed gradle properties is like this.
{
compileSdkVersion 27
defaultConfig {
applicationId "com.example.lqs2.materialtest"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:recyclerview-v7:24.2.1'
implementation 'com.android.support:cardview-v7:24.2.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
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'
}