扫码关注官方订阅号
看到Android api 23中 抛弃了HttpCclient ,试了一下,发现声明HttpClient时无法导入相应的Apache包。但看到好多源码中还在使用,是需要导入第三方库吗?
ringa_lee
参见 https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html,API 23 以后 Apache 官方也放弃了 HttpClient 对 Android 的支持,但 Apache 推荐可以使用第三方的 包:http://mvnrepository.com/artifact/cz.msebera.android/httpclient。
Gradle:'cz.msebera.android:httpclient:4.4.1.1'
'cz.msebera.android:httpclient:4.4.1.1'
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
参见 https://hc.apache.org/httpcomponents-client-4.5.x/android-port.html,API 23 以后 Apache 官方也放弃了 HttpClient 对 Android 的支持,但 Apache 推荐可以使用第三方的 包:http://mvnrepository.com/artifact/cz.msebera.android/httpclient。
Gradle:
'cz.msebera.android:httpclient:4.4.1.1'