看到Android api 23中 抛弃了HttpCclient ,试了一下,发现声明HttpClient时无法导入相应的Apache包。
但看到好多源码中还在使用,是需要导入第三方库吗?
看到Android api 23中 抛弃了HttpCclient ,试了一下,发现声明HttpClient时无法导入相应的Apache包。
但看到好多源码中还在使用,是需要导入第三方库吗?
2 回答1.5k 阅读✓ 已解决
2 回答1.9k 阅读
3 回答665 阅读✓ 已解决
1 回答2.2k 阅读
1 回答902 阅读✓ 已解决
1 回答1.4k 阅读
1 回答602 阅读✓ 已解决
参见 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'