我在我的Android应用程序中处理注册页面,并且我已成功完成它而没有任何错误。但我有一个问题。某些类显示为已弃用。
HttpClient httpClient = new DefaultHttpClient();
HttpContext httpContext = new BasicHttpContext();
HttpGet httpGet = new HttpGet(url);
try {
HttpResponse response = httpClient
.execute(httpGet, httpContext);
InputStream inputStream = response.getEntity().getContent();
input = (inputStreamToString(inputStream).toString())
.replaceAll("\\s+", "");
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
在这段代码中,HttpClient,HttpContext,HttpGet,HttpResponse,HttpClient,ClientProtocolException显示为已弃用。这有什么问题吗?如何将最新的类用于我的应用程序?