我正在嘗試將eclipse項目導入到android studio中。之後,將我的jar文件(即支持jar)添加到build gradle
文件中,無論我在eclipse中使用什麼。雖然這樣做得到低於錯誤。如何解決android studio中bulid gradle中的重複條目
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/database/DatabaseUtilsCompat.class
和我的gradle構建文件是:
apply plugin: 'com.android.application'
configurations {
// all*.exclude group: 'com.android.support', module: 'support-v4'
// all*.exclude group: 'com.android.support', module: 'support-annotations'
}
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xxx.xxxxx"
minSdkVersion 19
targetSdkVersion 25
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
aaptOptions {
cruncherEnabled = false
}
}
dependencies {
//compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services:+'
compile files('libs/android-query-full.0.26.7.jar')
compile files('libs/commons-httpclient-3.0.1.jar')
compile files('libs/glide-3.6.1.jar')
compile files('libs/httpmime-4.1.3.jar')
compile files('libs/library-1.2.1.jar')
compile files('libs/mpandroidchartlibrary-2-2-4.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/android-support-v7-appcompat.jar')
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') {
exclude module: 'support-v4' // exclude duplicate library
}
}
我被困在這裏。請幫我 – Durga