为什么Android的摇篮preDexDebug"源和目的必须是不同的"构建失败? [英] Why Android Gradle preDexDebug "Source and destination must be different" build failed?
本文介绍了为什么Android的摇篮preDexDebug"源和目的必须是不同的"构建失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Android应用程序内置了Android 0.8.1工作室和所面临的问题:
I have an Android application built with Android Studio 0.8.1 and facing the issue:
Error:Execution failed for task ':app:preDexDebug'.
> java.lang.IllegalArgumentException: Source C:\Users\mfedorov\AndroidStudioProjects\EPOS2\app\build\intermediates\pre-dexed\debug\mate-api-0.0.1-SNAPSHOT-0ef7e3259aeaf19202f545da97dc6b1ae2502c9a.jar and destination C:\Users\mfedorov.ALTIUS-PLUS\AndroidStudioProjects\EPOS2\app\build\intermediates\pre-dexed\debug\mate-api-0.0.1-SNAPSHOT-0ef7e3259aeaf19202f545da97dc6b1ae2502c9a.jar must be different
下面是我的build.gradle文件的内容(我已经改变了一部分,剩下的就是默认值)
Here's my build.gradle file contents (the part that I have changed, the rest is default)
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'org.apache.commons:commons-collections4:4.0'
compile 'org.slf4j:slf4j-android:1.7.7'
compile 'com.altius.logging:logging-utils:0.0.1-SNAPSHOT'
compile group: "com.altius.mate", name: "mate-bluetooth", version: "0.0.1-SNAPSHOT", changing: true
compile group: "com.altius.mate", name: "mate-api", version: "0.0.1-SNAPSHOT", changing: true
//compile('org.simpleframework:simple-xml:2.7.1') {
//exclude group: 'stax', module: 'stax-api'
//exclude group: 'xpp3', module: 'xpp3'
//}
}
与Android项目创建的根build.gradle的
内容是默认的
contents of the root build.gradle are default as created with android project
队友-API-0.0.1-快照文物是从Maven的本地资源库 mavenLocal()
mate-api-0.0.1-SNAPSHOT artifacts are from Maven local repository mavenLocal()
推荐答案
答案只是清理项目。我是有一段时间了同样的问题。
The answer was just to clean the project. I was having same problem for some time.
建立 - > 清理项目
这篇关于为什么Android的摇篮preDexDebug"源和目的必须是不同的"构建失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文