当前位置:网站首页>关于混淆的问题
关于混淆的问题
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.{ ;}
做下记录!
边栏推荐
- Win7 encounters an error and cannot boot into the desktop normally, how to solve it?
- 二叉排序树与 set、map
- MATLAB图形加标注的基本方法入门简介
- Win10 computer can't read U disk?Don't recognize U disk how to solve?
- Use libcurl to upload the image of Opencv Mat to the file server, based on two methods of post request and ftp protocol
- Golang 垃圾回收机制详解
- Flink + sklearn - use JPMML implement flink deployment on machine learning model
- 深入理解Golang之Map
- Please make sure you have the correct access rights and the repository exists. Problem solved
- Detailed introduction to the hierarchical method of binary tree creation
猜你喜欢
Installation and configuration of Spark and related ecological components - quick recall
word方框怎么打勾?
Win10 computer can't read U disk?Don't recognize U disk how to solve?
A clean start Windows 7?How to load only the basic service start Windows 7 system
How to simulate 1/3 probability with coins, and arbitrary probability?
Open the door of electricity "Circuit" (1): voltage, current, reference direction
二叉排序树与 set、map
推开机电的大门《电路》(一):电压,电流,参考方向
[STM32 Learning 1] Basic knowledge and concepts are clear
mysql学习总结 & 索引
随机推荐
推开机电的大门《电路》(二):功率计算与判断
Codeforces Round #605 (Div. 3)
Redis的线程模型
Software Testing Basics (Back)
In-depth understanding of Golang's Map
MATLAB绘图命令fimplicit绘制隐函数图形入门详解
TCP三次握手、四次挥手
Mapreduce环境详细搭建和案例实现
用U盘怎么重装Win7系统?如何使用u盘重装系统win7?
win10 system update error code 0x80244022 how to do
动态规划理论篇
What should I do if the Win10 system sets the application identity to automatically prompt for access denied?
使用 腾讯云搭建一个个人博客
word方框怎么打勾?
The SSE instructions into ARM NEON
pygame image rotate continuously
How to simulate 1/3 probability with coins, and arbitrary probability?
General code for pytorch model to libtorch and onnx format
Detailed explanation of Golang garbage collection mechanism
4. Publish Posts, Comment on Posts