当前位置:网站首页>关于混淆的问题
关于混淆的问题
2022-08-02 14:11:00 【海无垠】
关于JavaBean的混淆处理
项目在打release包的时候,Javabean类都是做了混淆的。目前遇到两种场景:
- APP内
界面传值,如果JavaBean不做混淆,那么接受页面拿不到传递的数据,会报空指针异常,处理方法:
一种: 在混淆配置文件中添加bean类包名,这样该包下所有的bean类都可以不被混淆了
-keep public class yourBeanPackageName.**{*;}
第二种,因为我们的项目使用了Parcelable混淆处理,只要实现了Parcelable,就默认不会被混淆
- app与其它应用交互
我使用的场景是 app跳转微信小程序,携带参数跳转,参数以json的形式,拼接到url地址上,json转化使用的是GSON,gson的混淆有说明:
***使用Gson时需要配置Gson的解析对象及变量都不混淆。不然Gson会找不到变量。, 一开始我以为 JavaBean实现了Parcelable就不需要再做处理了,结果妥妥的混淆了,还需要单独再做一次混淆处理,处理就使用:
-keep public class yourBeanPackageName.{ ;}
做下记录!
边栏推荐
- 永久更改pip源
- 第二十五章:一文掌握while循环
- Win10电脑需要安装杀毒软件吗?
- 为vscode配置clangd
- Win11电脑一段时间不操作就断网怎么解决
- Daily - Notes
- Do Windows 10 computers need antivirus software installed?
- Detailed introduction to the hierarchical method of binary tree creation
- How to set the win10 taskbar does not merge icons
- Exotic curiosity-a solution looking - bit operations
猜你喜欢

Win10电脑需要安装杀毒软件吗?

5. Transaction management

Exotic curiosity-a solution looking - bit operations

Configure clangd for vscode

Flink + sklearn - use JPMML implement flink deployment on machine learning model

MATLAB绘图命令fimplicit绘制隐函数图形入门详解

STM32LL库使用——SPI通信
![[System Design and Implementation] Flink-based distracted driving prediction and data analysis system](/img/f0/23ac631b6eb9b794224d8ae78e6523.png)
[System Design and Implementation] Flink-based distracted driving prediction and data analysis system

4.发布帖子,评论帖子

第三十一章:二叉树的概念与性质
随机推荐
Doubled and sparse tables
7.Redis
How to solve Win11 without local users and groups
测试用例练习
General code for pytorch model to libtorch and onnx format
Mysql之MVCC
3. User upload avatar
2021-10-14
Codeforces Round #605 (Div. 3)
二叉排序树与 set、map
Fast advanced TypeScript
MATLAB制作简易小动画入门详解
第三十三章:图的基本概念与性质
golang之GMP调度模型
总结计算机网络超全面试题
TCP三次握手、四次挥手
求解斐波那契数列的若干方法
Introduction to C language function parameter passing mode
二叉树创建之层次法入门详解
How to simulate 1/3 probability with coins, and arbitrary probability?