Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android M移除了HttpClient #2

Open
70kg opened this issue Jan 14, 2016 · 2 comments
Open

android M移除了HttpClient #2

70kg opened this issue Jan 14, 2016 · 2 comments

Comments

@70kg
Copy link

70kg commented Jan 14, 2016

然后Response就不能直接继承BasicHttpResponse,请问这个应该怎么解决?

@zmovane
Copy link

zmovane commented Mar 20, 2016

在你的gradle文件中加入useLibrary 'org.apache.http.legacy'
如:
android{
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
// 省略其余代码
......
}
参考自https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client

@70kg
Copy link
Author

70kg commented Mar 21, 2016

@leibnik 其实还可以去看看okhttp里面的实现,他好像是自己实现了apache的HttpClient,所以可以做到M的兼容,我觉得Volley主要可以学习面向接口编程,整个库逻辑也比较简单

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants