PaoNet icon indicating copy to clipboard operation
PaoNet copied to clipboard

混淆问题

Open Forest0924 opened this issue 5 years ago • 3 comments

偶然发现一个问题。 layout文件中 android:onClick="@{(v)->presenter.onClick(v)}" 会导致混淆错误。 报错信息的大概意思是无法解析 "@" 字符,这个需要额外的混淆处理么?

Forest0924 avatar May 09 '19 03:05 Forest0924

不用吧,混淆应该不会混淆资源文件吧 另外,能提供错误的截图吗?

ditclear avatar May 09 '19 03:05 ditclear

不是混淆资源文件,是混淆规则里keep 监听器回调事件时导致的。

Forest0924 avatar May 09 '19 04:05 Forest0924

https://stackoverflow.com/questions/35472130/conflict-between-android-data-binding-and-guava-causes-proguard-error 添加以下代码试试 -dontwarn android.databinding.** -keep class android.databinding.** { *; }

ditclear avatar May 09 '19 04:05 ditclear