我一直在关注有关如何从 android 应用程序将数据插入数据库的在线教程,并且除了这个小部分之外,一切正常
List<NameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("username", username));
params.add(new BasicNameValuePair("password", password));
NameValuePair 和 BasicNameValuePair 已被弃用,取而代之的是openConnection()
. 我怎样才能创建一个新的价值关联呢?http://developer.android.com/reference/java/net/URL.html#openConnection()
有谁知道如何使用 openConnection 创建名称值对?我到处寻找。