Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastjson 1.2.57版本部分机型闪退崩溃 #2372

Open
xuchenchen opened this issue Apr 13, 2019 · 3 comments
Open

fastjson 1.2.57版本部分机型闪退崩溃 #2372

xuchenchen opened this issue Apr 13, 2019 · 3 comments

Comments

@xuchenchen
Copy link

image

调用:JSON.parseArray(“json字符串数据”, Map.class);

报错信息如下:
java.lang.NoSuchMethodError: No interface method getTypeName()Ljava/lang/String; in class Ljava/lang/reflect/Type; or its super classes (declaration of 'java.lang.reflect.Type' appears in /system/framework/core-oj.jar)
at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.java:32)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:776)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:710)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:705)
at com.alibaba.fastjson.JSON.parseArray(JSON.java:593)

@wenshao
Copy link
Member

wenshao commented Apr 15, 2019

Android版本建议使用1.1.70.android版本

@wenshao
Copy link
Member

wenshao commented Apr 15, 2019

这个是因为用了JDK 1.8 API导致不兼容

@xuchenchen
Copy link
Author

这个是因为用了JDK 1.8 API导致不兼容
非常感谢回答,希望能所有API能给予兼容,我目前暂时回退到上个版本,陆续在替换为GSON来替换fastJson目前回退上个版本和替换为Gson都能解决此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants