【发布时间】:2015-05-31 10:58:24
【问题描述】:
我正在使用 android studio API22,但出现以下错误:
'org.apache.http.HttpEntity' is deprecated
'org.apache.http.HttpResponse' is deprecated
'org.apache.http.NameValuePair' is deprecated
'org.apache.http.client.HttpClient' is deprecated
'org.apache.http.client.entity.UrlEncodedFormEntity' is deprecated
'org.apache.http.client.methods.HttpPost' is deprecated
'org.apache.http.impl.client.DefaultHttpClient' is deprecated
'org.apache.http.message.BasicNameValuePair' is deprecated
'org.apache.http.params.BasicHttpParams' is deprecated
'org.apache.http.params.HttpConnectionParams' is deprecated
'org.apache.http.params.HttpParams' is deprecated
'org.apache.http.util.EntityUtils' is deprecated
我该如何解决这个问题?
【问题讨论】:
-
这不是错误。这是警告。您应该阅读文档。必须提示您应该使用哪个类
-
inspection 'Deprecated API usage' 选项:编辑检查配置文件设置,并将类 'HttpEntity' 注释为 @Deprecated:编辑意图设置。我应该选择哪些选项?我真的不知道它们是什么意思
标签: java android apache-httpclient-4.x