Sollyu

  • 捐赠
  • 关于
Sollyu
生命不息 折腾不止
  1. 首页
  2. 原创文章
  3. 正文

Kotlin使用Gson混淆之后异常

2018年11月16日 4576点热度 6人点赞 0条评论

说明

最近的项目中使用了Gson作为json解析,在对kotlin中的enum对象解析toJson时Debug下一切正常,在Release混淆之后却出现NoSuchFieldException,百思不得姐。最终使用Google搜索到一篇文章得以解决

Gson Will Crash at Enum Fields When Enabling Proguard

Recently we used Gson to convert data into JSON string and saved into Preference as cache. Everything looks good except release app crashed when reading JSON cache on release build.
原文地址:点击直达

标签: Gson Kotlin
最后更新:2018年11月16日

sollyu

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >
友情连接
  • PTL
  • 亮灯捡货
  • 亮灯捡选
  • 宠物托运
  • 快速捡货

COPYRIGHT © 2023 sollyu.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang