HttpClient依赖项警告Android Studio

HttpClient依赖项警告Android Studio,android,android-studio,gradle,httpclient,apache-httpclient-4.x,Android,Android Studio,Gradle,Httpclient,Apache Httpclient 4.x,我收到以下警告 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { applicationId "com.example" minSdkVersion 14 targetSdkVersion 23 versionCode 1

我收到以下警告

apply plugin: 'com.android.application'

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

repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:support-v13:23.1.0'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
    compile 'oauth.signpost:signpost-core:1.2.1.2'
    compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
    compile('org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2')
    compile ('oauth.signpost:signpost-commonshttp4:1.2.1.2') {
        exclude module: 'commons-logging'
        exclude module: 'httpcore'
        exclude module: 'httpclient'
    }
    compile ('oauth.signpost:signpost-core:1.2.1.2') {
        exclude module: 'commons-codec'
        }
}

不知道如何处理,任何帮助都将不胜感激

删除此行,它是双倍的

Warning:Dependency org.apache.httpcomponents:httpclient:4.0.1 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.0.1 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
有几件事:

compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
您已经添加了
oauth.signpost:signpost-commonshttp4:1.2.1.2
两次:一次不包含任何排除项,一次包含。尝试在没有警告的情况下删除该警告,以查看您的警告是否消失(它们应该消失)

此外,使用最新的生成工具版本(您可能需要升级到
23.0.2
),您可以删除此行:

compile 'oauth.signpost:signpost-commonshttp4:1.2.1.2'
compile('org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2')
compile ('oauth.signpost:signpost-commonshttp4:1.2.1.2') {
    exclude module: 'commons-logging'
    exclude module: 'httpcore'
    exclude module: 'httpclient'
}
(旁注:这可能应该是
提供的
,而不是
编译

然后添加到
android
部分,如下所示:


删除
排除模块:“httpclient”
尝试得不错,但运气不好@MD
compile('org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2')
useLibrary 'org.apache.http.legacy'