android:app:transformClassesWithDexForDebug

时间:2015-10-01 11:23:46

标签: android android-gradle build.gradle

我已经厌倦了2-3个小时后解决这个错误。请帮我解决这个问题。

所以,我在build.gradle(module:app)文件中有以下依赖项:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
    applicationId "com.example.corpchat"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.github.johnkil.android-robototextview:robototextview:2.4.0'
compile 'com.android.support:design:23.0.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.github.clans:fab:1.6.0'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'org.igniterealtime.smack:smack-android:4.1.3'
compile 'org.igniterealtime.smack:smack-bosh:4.1.3'
compile 'org.igniterealtime.smack:smack-tcp:4.1.3'
compile 'org.igniterealtime.smack:smack-im:4.1.3'
compile 'org.jxmpp:jxmpp-jid:0.5.0-alpha6'
compile 'org.igniterealtime.smack:smack-extensions:4.1.3'
compile 'com.android.support:support-v4:23.0.1'
compile files('libs/volley-1.0-SNAPSHOT.jar')
compile project(':emoji')
compile 'com.cocosw:bottomsheet:1.2.0'
//    compile 'org.apache.httpcomponents:httpcore:4.4.3'
//    compile 'org.apache.httpcomponents:httpmime:4.5.1'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
    exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
}

的build.gradle(模块:corpchat):

// 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.3.0'
        classpath 'com.android.tools.build:gradle:1.4.0-beta3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

我在运行项目时遇到以下错误:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.3 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:emoji:preBuild UP-TO-DATE
:emoji:preReleaseBuild UP-TO-DATE
:emoji:compileReleaseNdk UP-TO-DATE
:emoji:compileLint
:emoji:copyReleaseLint UP-TO-DATE
:emoji:mergeReleaseProguardFiles UP-TO-DATE
:emoji:checkReleaseManifest
:emoji:prepareReleaseDependencies
:emoji:compileReleaseAidl UP-TO-DATE
:emoji:compileReleaseRenderscript UP-TO-DATE
:emoji:generateReleaseBuildConfig UP-TO-DATE
:emoji:generateReleaseAssets UP-TO-DATE
:emoji:mergeReleaseAssets UP-TO-DATE
:emoji:generateReleaseResValues UP-TO-DATE
:emoji:generateReleaseResources UP-TO-DATE
:emoji:packageReleaseResources UP-TO-DATE
:emoji:processReleaseManifest UP-TO-DATE
:emoji:processReleaseResources UP-TO-DATE
:emoji:generateReleaseSources UP-TO-DATE
:emoji:compileReleaseJavaWithJavac UP-TO-DATE
:emoji:processReleaseJavaRes UP-TO-DATE
:emoji:packageReleaseJar UP-TO-DATE
:emoji:packageReleaseJniLibs UP-TO-DATE
:emoji:packageReleaseLocalJar UP-TO-DATE
:emoji:packageReleaseRenderscript UP-TO-DATE
:emoji:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComCocoswBottomsheet120Library UP-TO-DATE
:app:prepareComGithubClansFab160Library UP-TO-DATE
:app:prepareComGithubJohnkilAndroidRobototextviewRobototextview240Library UP-TO-DATE
:app:prepareCorpChatEmojiUnspecifiedLibrary UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview130Library UP-TO-DATE
:app: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:prepareComAndroidSupportMultidexInstrumentation101Library UP-TO-DATE
:app: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:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesAndResourcesWithExtractJarsForDebug
CHANGED: /home/chintan/Projects/CorpChat/app/build/intermediates/exploded-aar/com.android.support/multidex/1.0.1/jars/classes.jar
:app:transformClassesWithJarMergingForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/io/HttpMessageParserFactory.class
Information:BUILD FAILED
Information:Total time: 5.101 secs
Information:1 error
Information:6 warnings
Information:See complete output in console

请帮帮我。感谢。

0 个答案:

没有答案