【发布时间】:2017-03-09 17:54:26
【问题描述】:
Lvl 库不再在 Android Marshmallow 上编译,因为删除了缺少 apache 的东西。您可以添加useLibrary 'org.apache.http.legacy,但这只是临时解决方法。问题是这个方法:
private Map<String, String> decodeExtras(String extras) {
Map<String, String> results = new HashMap<String, String>();
try {
URI rawExtras = new URI("?" + extras);
List<NameValuePair> extraList = URLEncodedUtils.parse(rawExtras, "UTF-8");
for (NameValuePair item : extraList) {
results.put(item.getName(), item.getValue());
}
} catch (URISyntaxException ignored) {
}
return results;
}
NameValuePair 和 URLEncodedUtils 未找到。
什么是新的"way"?如何使用与新 Android 版本兼容的新代码替换此调用?
【问题讨论】:
-
是的,但它已被关闭为重复,其他问题也已关闭为错误论坛......所以?
-
如果你得到它,请发布解决方案......如果我得到它,我会做同样的......
标签: android android-6.0-marshmallow