JSON 数组反序列化导致 Dalvik VM 崩溃
我有一些代码从我的服务器获取 JSON 数组并最初将其存储为字符串。这一切都工作正常,直到我尝试使用谷歌的 gson fromJson 方法对其进行反序列化。 LogCat 吐出错误:
04-08 17:46:35.163: ERROR/dalvikvm(401): Can't Shrink Stack: curFrame is inserved area (0x41049000 0x410491c4)
导致错误的代码是:
String[] results = gson.fromJson(returnString, String[].class);
任何人都可以阐明我做错了什么吗?
干杯, 山姆
I have some code grabbing a JSON array from my server and initially storing it as a string. This all works fine until I try and deserialize it using google's gson fromJson method. LogCat spits out the error:
04-08 17:46:35.163: ERROR/dalvikvm(401): Can't shrink stack: curFrame is in reserved area (0x41049000 0x410491c4)
My code that causes the error is:
String[] results = gson.fromJson(returnString, String[].class);
Can anyone shed some light on what I am doing wrong?
Cheers,
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能遇到以下未决问题:http://code。 google.com/p/android/issues/detail?id=6245。
您尝试反序列化的 JSON 有多大?
You may be running into the following open issue: http://code.google.com/p/android/issues/detail?id=6245.
How large is the JSON that you are trying to de-serialize?