android import org.apache.http.NameValuePair 错误问题
程序员文章站
2024-01-09 20:08:22
修改 build.gradle(Module:app) 文件,添加以下代码android { useLibrary 'org.apache.http.legacy'}dependencies { implementation 'org.apache.httpcomponents:httpcore:4.4.1'}完整build.gradle(Module:app) 文件,如下所示apply plugin: 'com.android.applica......
- 修改 build.gradle(Module:app) 文件,添加以下代码
-
android { useLibrary 'org.apache.http.legacy' }
-
dependencies { implementation 'org.apache.httpcomponents:httpcore:4.4.1' }
- 完整 build.gradle(Module:app) 文件,如下所示
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.arioliu"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'org.apache.httpcomponents:httpcore:4.4.1'
}
本文地址:https://blog.csdn.net/MoDa_Li/article/details/107185334
下一篇: ThinkPHP 保护模板资料
推荐阅读
-
android import org.apache.http.NameValuePair 错误问题
-
解析android res 运行错误的问题
-
[Android测试] Appium的一些坑问题错误解决 与 技巧集锦
-
android studio编程时出现的错误问题
-
解决VSCode调试react-native android项目错误问题
-
android import org.apache.http.NameValuePair 错误问题
-
解决VSCode调试react-native android项目错误问题
-
android studio编程时出现的错误问题
-
"python\ops\_gru_ops.dll not found"问题解决方案(python import导入包出现资源定位错误的问题)