Android Studio HttpClient ( Android 6.0 )
来源:互联网 发布:描述欧几里德算法 编辑:程序博客网 时间:2024/05/21 17:35
/*--------------------------------------------------------*/
//官方原文
Apache HTTP Client Removal
Android 6.0 release removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection class instead. This API is more efficient because it reduces network use through transparent compression and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:
android {
useLibrary 'org.apache.http.legacy'
}
//官方原文
Apache HTTP Client Removal
Android 6.0 release removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection class instead. This API is more efficient because it reduces network use through transparent compression and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:
android {
useLibrary 'org.apache.http.legacy'
}
/*--------------------------------------------------------*/
解决方法:
在Android Studio 项目下 build.gradle 文件中加入如下代码:
android { useLibrary 'org.apache.http.legacy' }
0 0
- Android Studio HttpClient ( Android 6.0 )
- android studio 使用httpclient
- Android Studio与HttpClient
- Android studio导入HttpClient
- android studio httpclient
- android studio 不支持HttpClient
- Android Studio——HttpClient
- android studio中HttpClient解决
- Android Studio API23以后HttpClient
- android studio怎么生成HttpClient
- HttpClient在Android Studio中报错
- android studio怎么生成HttpClient????
- Android studio使用HttpClient出错
- Android Studio API23 HttpClient解决办法
- android studio不能使用HttpClient
- Android studio开发找不到HttpClient问题
- Android Studio使用HttpClient相关类库
- Android studio无法使用HttpClient解决
- C - 限时代码
- 共用体,枚举型
- iOS自动打包并发布脚本
- STM32F407之模拟I2C(二)之24C128
- 两个postgresSQL数据库对象比对
- Android Studio HttpClient ( Android 6.0 )
- ARC环境下两种单例设计模式的比较:GCD和同步锁
- JavaScript--Array数组的使用
- HDU 1236
- 三个linux脚本
- lambda表达式:变量作用域
- Android Studio——ListView的高级使用
- PHP __autoload()函数
- 结构性模式-适配器模式