web-dev-qa-db-fra.com

Plusieurs fichiers ont été trouvés avec le chemin indépendant du système d'exploitation «org / Apache / http / client / version.properties»

Tout fonctionne correctement avant de mettre à jour Android studio de 2.3 à 3.0. J'ai eu cette erreur lors de l'exécution de l'application dans Android Studio, la compilation est réussie. Je ne peux pas comprendre pourquoi cette erreur apparaît. Et je n'ai rien trouvé sur Internet.

voici mon dossier gradle.

 packagingOptions {

        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'

    }
}

repositories {
    mavenCentral()
    google()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/DraggableGridView.jar')
    compile files('libs/httpclient-4.3.6.jar')
    compile files('libs/httpcore-4.3.3.jar')
    compile files('libs/httpmime-4.3.6.jar')
    compile files('libs/Android-query-full.0.26.7.jar')
    compile project(':gestureimageview')
    compile files('libs/commons-lang3-3.5.jar')
    compile files('libs/json_simple-1.1.jar')
    compile('com.google.api-client:google-api-client-Android:1.22.0') {
        exclude group: 'org.Apache.httpcomponents'
    }

    compile group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '3.0.4', changing: true

    //    compile 'com.dropbox.core:dropbox-core-sdk:3.0.4'

    //    compile 'ly.img.Android:photo-editor-sdk:5.0.0-beta'

    //    compile 'com.github.thorbenprimke:realm-searchview:0.9.6'
    //    debugCompile 'com.squareup.leakcanary:leakcanary-Android:1.5.2'

    //    releaseCompile 'com.squareup.leakcanary:leakcanary-Android-no-op:1.5.2'

    compile 'com.squareup.okhttp:okhttp:2.7.5'
    compile 'com.squareup.okhttp3:okhttp:3.7.0'
    compile 'com.matthew-tamlin:sliding-intro-screen:3.2.0'
    compile 'com.instabug.library:instabug:4.3.0'
    compile 'com.Android.support:appcompat-v7:25.4.0'
    compile 'com.Android.support:support-v4:25.4.0'
    compile 'com.Android.support:design:25.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.Android.support:recyclerview-v7:25.4.0'
    compile 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
    compile 'com.Android.support:cardview-v7:25.4.0'
    compile 'com.google.firebase:firebase-messaging:11.4.2'
    compile 'com.facebook.Android:facebook-Android-sdk:[4,5)'
    compile 'com.Android.support.constraint:constraint-layout:1.0.2'
    compile 'com.Android.support:customtabs:25.4.0'
    compile 'com.Android.support:palette-v7:25.4.0'
    compile 'com.Android.support:multidex:1.0.2'
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
    compile 'ly.img.Android:photo-editor-sdk:5.0.6'
    compile 'de.morrox.fontinator:Fontinator:1.1.3'
    compile 'com.google.Android.gms:play-services-drive:11.4.2'
    compile 'com.romandanylyk:pageindicatorview:0.0.7'
    compile 'com.Android.support:support-annotations:27.0.0'
    compile 'com.Android.support:support-compat:25.4.0'
    compile 'com.Android.support:support-core-ui:25.4.0'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'pl.bclogic:pulsator4droid:1.0.3'
    compile 'com.google.Android.gms:play-services-identity:11.4.2'
    compile 'com.google.http-client:google-http-client-gson:1.20.0'
    compile 'com.google.Android.gms:play-services-auth:11.4.2'
    compile 'com.google.apis:google-api-services-drive:v2-rev247-1.22.0'
    testCompile 'junit:junit:4.12'

}

voici l'erreur que je reçois à chaque fois

L'exécution a échoué pour la tâche ': app: transformResourcesWithMergeJavaResForDebug'. Plusieurs fichiers ont été trouvés avec le chemin indépendant du système d'exploitation "org/Apache/http/client/version.properties"

10
Amar Sharma

Ajoutez simplement

packagingOptions {
    exclude 'org/Apache/http/version.properties'
    exclude 'org/Apache/http/client/version.properties'
}

dans votre application build.xml puis projet Clean/sync. J'espère que cela t'aides.

12
amit srivastava