为什么Android的摇篮preDexDebug"源和目的必须是不同的"构建失败?目的、摇篮、不同、Android

由网友(颓废)分享简介:我有一个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 '...

我有一个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:UsersmfedorovAndroidStudioProjectsEPOS2appbuildintermediatespre-dexeddebugmate-api-0.0.1-SNAPSHOT-0ef7e3259aeaf19202f545da97dc6b1ae2502c9a.jar and destination C:Usersmfedorov.ALTIUS-PLUSAndroidStudioProjectsEPOS2appbuildintermediatespre-dexeddebugmate-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.

建立 - > 清理项目

阅读全文

相关推荐

最新文章