我很乐意提供进一步的信息.
错误:任务’:app:packageAllDeBUGClassesForMultIDex’的执行失败.
java.util.zip.ZipException: duplicate entry: com/Google/zxing/barcodeFormat.class
请帮忙!!我应该尝试让它在Eclipse中运行吗?
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { jcenter() } dependencIEs { classpath 'com.androID.tools.build:gradle:1.1.2' }}allprojects { repositorIEs { jcenter() }}apply plugin: 'com.androID.application'androID { compileSdkVersion 21 buildToolsversion "21.1.2" defaultConfig { applicationID "com.appname.androID" minSdkVersion 8 targetSdkVersion 18 multIDexEnabled true } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.txt' } }}dependencIEs { compile 'com.androID.support:support-v4:22.1.1' compile files('libs/ksoap2-androID-assembly-3.1.0-jar-with-dependencIEs.jar') provIDed files('libs/zxing-core.jar')}解决方法 确保您拥有SDK管理器中的最新版本toolds和sdk.我已将这些jar转换为Gradle依赖项.
的build.gradle:
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { jcenter() maven { url 'https://oss.sonatype.org/content/repositorIEs/ksoap2-androID-releases/' } // <-- added for ksoap } dependencIEs { classpath 'com.androID.tools.build:gradle:1.1.3' // <-- updated }}allprojects { repositorIEs { jcenter() maven { url 'https://oss.sonatype.org/content/repositorIEs/ksoap2-androID-releases/' } // <-- added for ksoap }}
应用程序/的build.gradle:
apply plugin: 'com.androID.application'androID { compileSdkVersion 22 buildToolsversion "22.0.1" // <-- updated defaultConfig { applicationID "com.appname.androID" minSdkVersion 8 targetSdkVersion 22 // <-- updated // multIDexEnabled true // <-- you do not need this } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.txt' } }}dependencIEs { compile 'com.androID.support:support-v4:22.1.1' compile 'com.Google.code.ksoap2-androID:ksoap2-androID:3.4.0' // compile files('libs/ksoap2-androID-assembly-3.1.0-jar-with-dependencIEs.jar') // <-- avoID using jars compile 'com.Google.zxing:core:3.2.0' // provIDed files('libs/zxing-core.jar') // <-- avoID using jars}总结
以上是内存溢出为你收集整理的android – java.util.zip.ZipException:重复条目全部内容,希望文章能够帮你解决android – java.util.zip.ZipException:重复条目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)