我正在使用Android Studio 1.5,而我的成绩是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 14
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.beatzplayer"
minSdkVersion 14
targetSdkVersion 14
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
minifyEnabled false
}
}
}
dependencies {
compile files('libs/jl1.0.1.jar')
compile files('libs/JLayer1.0.1.jar')
compile files('libs/mp3spi1.9.4.jar')
compile files('libs/tritonus_share.jar')
}
我已经同步,清理并重建了Gradle,但是当我在选择设备后尝试运行该应用程序时,该应用程序给了我这个错误:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: javazoom/jl/converter/Converter$PrintWriterProgressListener.class
之后,我阅读了Error after adding play-services library : ':app:transformClassesWithJarMergingForDebug',因此添加了以下代码:
compile('libs/JLayer1.0.1.jar') {
exclude module: 'converter'
}
当我再次同步gradle时,它向我报告了这一信息:
Error:(29, 0) Gradle DSL method not found: 'exclude()'
最佳答案
作为错误我说您有一个名称不同的jar文件具有相同的类
compile files('libs/jl1.0.1.jar')
compile files('libs/JLayer1.0.1.jar')
如果不需要删除,则两者都是相同的,而不是构建gradel
再来一次
关于android - 错误:任务 ':app:transformClassesWithJarMergingForDebug'的执行失败。双重输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34088649/