配置gson混淆(复制下面这段到混淆文件):##---------------Begin: proguard configuration for Gson  ----------# Gson uses generic type information stored in a class file when working with fields. Proguard# removes such information by default, so configure it to keep all of it.-keepattributes Signature# For using GSON @Expose annotation-keepattributes *Annotation*# Gson specific classes-keep class sun.misc.Unsafe { *; }#-keep class com.google.gson.stream.** { *; }# Application classes that will be serialized/deserialized over Gson-keep class com.xxx.entity.** { *; }##---------------End: proguard configuration for Gson  ----------

注意:上面倒数第二行是防止你的实体类被混淆, com.xxx.entity. 是你实体类的包路径

更多相关文章

  1. 解决jdk1.6已经安装,编译android源码报错问题
  2. Android中音频文件的使用
  3. Android(安卓)命令行签名打包,加固二次打包
  4. Android版本检测\自动更新
  5. Android(安卓)Studio 项目运行错误,弹出“Detected ADB对话框”
  6. android -------- 混淆打包报错(warning - InnerClass annotatio
  7. Ubuntu 下开发 Android(安卓)环境变量设置
  8. 设置默认来电铃声 android
  9. Ubuntu 下开发 Android(安卓)环境变量设置

随机推荐

  1. 浅析android 控件listView中的设计模式
  2. Android(安卓)面试经验 - 类的加载机制
  3. (转载)不需要任何权限获得Android设备的唯
  4. Android实现的ListView-ListViewAdapter(
  5. Android(安卓)4.0 Contacts 首页(PeopleA
  6. 配置colorAccent,colorPrimary,colorPrim
  7. Android之MVVM架构指南:ViewModel
  8. Selinux的权限以及使用
  9. Activity都掌握了?来看看你还有多少漏洞!
  10. android动画 开发者选项中动画时长原理分