当我想添加此库时:
implementation 'com.daimajia.slider:library:1.1.5@aar'
我的android studio崩溃了,这是我的 app模块:
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.mahdi.introductionapps"
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(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
}
这是我的错误:
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.daimajia.slider:library:1.1.5.
答案 0 :(得分:1)
尝试做这些事情
Clean & Rebuild Project
或
File > Invalidate Caches and Restart > Invalidate and Restart
或
Uncheck Gradle Work Offline
答案 1 :(得分:1)
答案 2 :(得分:0)
该库没有问题。