我正在尝试使用库创建一个android Image Slider: https://github.com/daimajia/AndroidImageSlider 但是在我将库添加到我的项目之后,gradle给了我这个错误:多个包含包名的库' com.daimajia.slider.library'
我的项目中有build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
defaultConfig {
applicationId "ir.korandco.irkhoone_mobile_app"
minSdkVersion 11
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:23.1.0'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':bottom-bar')
compile project(':library')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile group: 'org.jacoco', name: 'org.jacoco.agent', version: '0.7.5.201505241946'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.daimajia.androidanimations:library:1.0.3@aar'
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
android {
useLibrary 'org.apache.http.legacy'
}
}
和gradle库:
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
enforceUniquePackageName = false
defaultConfig {
minSdkVersion 8
targetSdkVersion 22
versionCode 15
versionName "1.1.5"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile "com.android.support:support-v4:22.1.1"
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
}