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

与httpclient相关的类都找不到,报错了,望删除对httpclient的依赖 #4

Open
dongweiq opened this issue Apr 28, 2016 · 3 comments

Comments

@dongweiq
Copy link

org.apache.http.HttpStatus;
org.apache.http.HttpResponse;
android.net.http.AndroidHttpClient;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolVersion;
import org.apache.http.StatusLine;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.message.BasicHeader;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;

这些全部报错,要不就引入httpclient,要不就删除,😂

@dongweiq
Copy link
Author

android6.0删除了对httpclient的引用,要不就自己加入,要不就不用httpclient好了

@dongweiq
Copy link
Author

dongweiq commented Apr 28, 2016

在volley的build.gradle里又添加对于httclient的依赖,然后就可以了
android {
//兼容API 23干掉了httpClient,手动加入httpClient库,或者将org.apache.http.legacy.jar放到lib文件中
useLibrary 'org.apache.http.legacy'

compileSdkVersion 23
buildToolsVersion '23.0.3'
}

@jiangqqlmj
Copy link
Owner

项目中已经添加了 org.apache.http.legacy.jar

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