JessYanCoding / MVPArt

🎨 A new Android MVP architecture (此框架旨在解决传统 MVP 类和接口太多, 并且 Presenter 和 View 通过接口通信过于繁琐, 重用 Presenter 代价太大等问题).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在Demo中开启混淆后UserPresenter报错

RockyQu opened this issue · comments

commented

super(appComponent.repositoryManager().createRepository(UserRepository.class)); 这句报错,请问有遇到的吗?

https://github.com/JessYanCoding/MVPArms/wiki#1.5 说得很清楚, 需要自己去定义混淆规则

commented

原因找到了,因为底层 RepositoryManager 里的 findConstructorForClass 方法用的是反射,不能混淆 UserRepository 这个类
可以添加混淆参数
-keep class * implements me.jessyan.mvpart.demo.mvp.IModel {
;
;
}
直接拿来用的,不看底层源码的,肯定会有这个问题,建议记录下来

ok, 感谢指正, 已更新到 proguard-rules.pro