2
我正試圖在device.However運行應用程序時,這個錯誤gradle這個同步總是成功的。transformClassesWithJarMergingForDebug,com.android.build.api.transform.TransformException:java.util.zip.ZipException:重複的條目:
Error:Execution failed for task ':EmployeeManager:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: javax/jmdns/impl/constants/DNSConstants.class
請參閱下面的Grdale文件。
apply plugin: 'com.android.application'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile(name:'jmdns-3.4.1', ext:'jar')
compile(name:'mlite', ext:'jar')
compile project(':EmpManager')
compile project(':CustomerManager')
compile project(':NGPS_COMMON_LIBS')
}
android {
compileSdkVersion 19
buildToolsVersion '23.0.2'
packagingOptions{
exclude("META.INF/LICENSE.txt")
exclude("META.INF/README.txt")
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
defaultConfig {
multiDexEnabled true
}
}
向我們提供您的build.gradle –
添加了gradle文件,請看看。 –