3
当我试图解析String
至org.json.JSONObject
时,出现java.lang.RuntimeException: Stub!
异常。我的Android API版本是。Android - java.lang.RuntimeException:将字符串解析为JSONObject时出现Stub异常
这是我String
要解析:
{
"url": "http://www.google.com",
"cookie": "012121",
"filename": "Google"
}
JSONObject jsonObject = new JSONObject(str); // getting exception at this line
String url = jsonObject.getString("url");
试试这个..链接http://stackoverflow.com/questions/11874919/parsing-json-string-in-java – Hariharan
你得到这个设备/仿真程序或环境上的错误(测试)? –
http://stackoverflow.com/a/11875002/2337837 –