我想在API级别25使用HttpPost,HttpClient等,但它会发出警告
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.3.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
我已经尝试了所有内容并对其进行了大量搜索,但此依赖性警告未被删除
我的build.gradle是
android {
compileSdkVersion 25
buildToolsVersion "22.0.0"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "smartpark.park.com.smartpark"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appinvite:9.8.0'
// UiAutomatorTesting
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
androidTestCompile 'com.android.support:support-annotations:25.1.0'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'org.apache.httpcomponents:httpcore:4.1'
compile 'org.apache.httpcomponents:httpclient:4.3.5'
compile "org.apache.httpcomponents:httpmime:4.2.3"
}
我知道我可以使用HttpUrlConnection或URLConnection,但我只想使用它。 任何帮助,将不胜感激。 提前谢谢。