问题描述
我在Android Studio中使用一些旧代码参考进行编码。
我面临一些不推荐使用的方法。
哪里可以找到替换已弃用的方法的参考?
这是我使用的代码
1. DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new urlEncodedFormEntity(params));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
2. params.add(new BasicNameValuePair(tag,login_tag));
params.add(new BasicNameValuePair(email,email));
params.add(new BasicNameValuePair(password,password));
I am using some old code reference for coding in Android Studio.
I am facing some methods which are deprecated.
Where I can find reference to replace the deprecated methods?
This is the code I am using
1. DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
httpPost.setEntity(new UrlEncodedFormEntity(params));
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
2. params.add(new BasicNameValuePair("tag", login_tag));
params.add(new BasicNameValuePair("email", email));
params.add(new BasicNameValuePair("password", password));
这篇关于如何处理Android编程中不推荐使用的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!