我已经完成了所有问题,但没弄清楚什么对我有用。尝试过多少建议但尚未开始工作。请帮忙。
这是模块'imagepipelineokhttp'中的Build Gradle
apply plugin: 'com.android.library'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile files('libs/imagepipeline-okhttp-v0.4.0.jar')
}
来自App的Build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.mypacakge.myapp"
minSdkVersion 14
targetSdkVersion 19
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile files('libs/android-support-v4.jar')
compile 'com.android.support:multidex:1.0.0'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
compile files('libs/AF-Android-SDK.jar')
compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
compile files('libs/FlurryAnalytics-5.3.0.jar')
compile files('libs/android-viewbadger.jar')
compile files('libs/commons-codec-1.4.jar')
compile files('libs/google-play-services.jar')
compile files('libs/okhttp-2.5.0.jar')
compile files('libs/okio-1.6.0.jar')
compile files('libs/parcelgen.jar')
compile files('libs/scribe-1.1.2.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/gcm.jar')
compile project(':cropper')
compile project(':drawee')
compile project(':fastImageProcessing')
compile project(':fbcore')
compile project(':fresco')
compile project(':imagepipeline')
compile project(':imagepipelineokhttp')
compile project(':lib')
compile project(':facebook')
compile project(':swipelistview')
}
错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: com/facebook/imagepipeline/backends/okhttp/BuildConfig.class
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED