错误:任务':app:dexDebug'执行失败。 >

时间:2015-10-29 14:57:35

标签: android

尝试运行项目时出现此错误。这是我的build.gradle(模块:app)请帮助我

信息:Gradle任务[:app:generateDebugSources,:app:generateDebugAndroidTestSources,:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :应用:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :LIB:compileLint :lib:copyReleaseLint UP-TO-DATE :lib:preBuild UP-TO-DATE :lib:preReleaseBuild UP-TO-DATE :LIB:checkReleaseManifest :lib:preDebugAndroidTestBuild UP-TO-DATE :lib:preDebugBuild UP-TO-DATE :lib:preDebugUnitTestBuild UP-TO-DATE :lib:preReleaseUnitTestBuild UP-TO-DATE :lib:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE :lib:prepareComAndroidSupportCardviewV72220Library UP-TO-DATE :lib:prepareComAndroidSupportSupportV42220Library UP-TO-DATE :LIB:prepareReleaseDependencies :lib:compileReleaseAidl UP-TO-DATE :lib:compileReleaseRenderscript UP-TO-DATE :lib:generateReleaseBuildConfig UP-TO-DATE :lib:generateReleaseAssets UP-TO-DATE :lib:mergeReleaseAssets UP-TO-DATE :lib:generateReleaseResValues UP-TO-DATE :lib:generateReleaseResources UP-TO-DATE :lib:mergeReleaseResources UP-TO-DATE :lib:processReleaseManifest UP-TO-DATE :lib:processReleaseResources UP-TO-DATE :lib:generateReleaseSources UP-TO-DATE :lib:processReleaseJavaRes UP-TO-DATE :lib:compileReleaseJavaWithJavac UP-TO-DATE :lib:extractReleaseAnnotations UP-TO-DATE :lib:mergeReleaseProguardFiles UP-TO-DATE :lib:packageReleaseJar UP-TO-DATE :lib:compileReleaseNdk UP-TO-DATE :lib:packageReleaseJniLibs UP-TO-DATE :lib:packageReleaseLocalJar UP-TO-DATE :lib:packageReleaseRenderscript UP-TO-DATE :lib:packageReleaseResources UP-TO-DATE :lib:bundleRelease UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72220Library UP-TO-DATE :app:prepareComAndroidSupportMediarouterV72220Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72310Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42310Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServices810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAds810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppinvite810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAppstate810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesCast810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesDrive810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesFitness810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGames810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGcm810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesIdentity810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesLocation810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesMaps810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesMeasurement810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesNearby810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPanorama810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesSafetynet810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesVision810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesWallet810Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesWearable810Library UP-TO-DATE :app:prepareComSquareupLeakcanaryLeakcanaryAndroid131Library UP-TO-DATE :app:prepareMCSKLibUnspecifiedLibrary UP-TO-DATE :应用:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:preDebugAndroidTestBuild UP-TO-DATE :应用:prepareDebugAndroidTestDependencies :app:compileDebugAndroidTestAidl UP-TO-DATE :app:processDebugAndroidTestManifest UP-TO-DATE :app:compileDebugAndroidTestRenderscript UP-TO-DATE :app:generateDebugAndroidTestBuildConfig UP-TO-DATE :app:generateDebugAndroidTestAssets UP-TO-DATE :app:mergeDebugAndroidTestAssets UP-TO-DATE :app:generateDebugAndroidTestResValues UP-TO-DATE :app:generateDebugAndroidTestResources UP-TO-DATE :app:mergeDebugAndroidTestResources UP-TO-DATE :app:processDebugAndroidTestResources UP-TO-DATE :app:generateDebugAndroidTestSources UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :应用:preDexDebug :应用:dexDebug 意外的顶级例外情况: com.android.dex.DexException:多个dex文件定义Lcom / squareup / picasso / Action $ RequestWeakReference;     在com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)     在com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)     在com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)     在com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)     在com.android.dx.merge.DexMerger.merge(DexMerger.java:189)     在com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)     在com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)     在com.android.dx.command.dexer.Main.run(Main.java:277)     在com.android.dx.command.dexer.Main.main(Main.java:245)     在com.android.dx.command.Main.main(Main.java:106) 错误:任务':app:dexDebug'。

的执行失败
  

com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Program Files \ Java \ jdk1.7.0_75 \ bin \的java.exe''完成非零退出值2   信息:建筑失败   信息:总时间:1分钟17.833秒   信息:1错误   信息:0警告   信息:请参阅控制台中的完整输出

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.0'enter code here
    useLibrary('org.apache.http.legacy')
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/ASL2.0'
    }
    defaultConfig {
        applicationId "com.qubit.mcsk"
        minSdkVersion 13
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleDependency
    compile files('libs/gson-2.2.4.jar')
    compile files('libs/android-async-http-1.4.4.jar')
    compile files('libs/crouton-1.8.jar')
    compile files('libs/jackson-core-2.3.3.jar')
    compile files('libs/picasso-2.4.0.jar')
    compile files('libs/systembartint-1.0.4.jar')
    compile files('libs/crouton-1.8.jar')
    compile files('libs/buzzboxSDK-0.6.5.jar')
    compile 'com.android.support:recyclerview-v7:23.1.0'
    compile 'com.google.android.gms:play-services:8.1.0'
    compile 'commons-net:commons-net:1.4.0'
    compile 'com.google.android.gms:play-services-identity:8.1.0'
    compile 'com.google.android.gms:play-services-gcm:8.1.0'
    compile 'com.squareup.picasso:picasso:2.5.0'
    compile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
    compile project(':lib')

}
apply plugin: 'announce'

这是我的build.gradle(Module:lib)

 apply plugin: 'com.android.library'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
        versionCode 7
        versionName "1.2.1"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:cardview-v7:22.2.0'
}

//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'

0 个答案:

没有答案