DylanCaiCoding / ViewBindingKTX

The most comprehensive utils of ViewBinding. (最全面的 ViewBinding 工具,支持 Kotlin 和 Java 用法,支持 BRVAH,支持封装到基类,支持 DataBinding,支持选择是否使用反射)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tools7.1.1开启混淆后崩溃

ccominghome opened this issue · comments

commented

com.android.tools.build:gradle 7.1.1 开启混淆后崩溃,libcore.reflect.TypeVariableImpl cannot be cast to java.lang.Class

我建个项目测了 7.1.1 和 7.2 都能正常运行哦

commented

image

image

image

image

image

kotlin用的哪个版本,我在demo上这样改是可以复现的

commented

我建个项目测了 7.1.1 和 7.2 都能正常运行哦

image

报这几个错

感谢测试反馈,我在 Demo 上测了是适配器内敛的问题,其它反射都是正常的。出问题的只是下面的用法,你是不是在项目这么用了?

private val adapter = simpleStringListAdapter<ItemFooBinding> {
  textView.text = it
}

项目代码已修改,你升到 7.1.1 应该能正常运行 Demo 了。没别的问题话我明天发个版修复该问题。

已发 2.0.2 版本修复该问题

commented

感谢测试反馈,我在 Demo 上测了是适配器内敛的问题,其它反射都是正常的。出问题的只是下面的用法,你是不是在项目这么用了?

private val adapter = simpleStringListAdapter<ItemFooBinding> {
  textView.text = it
}

项目代码已修改,你升到 7.1.1 应该能正常运行 Demo 了。没别的问题话我明天发个版修复该问题。

排查到了,不是因为这个,项目中使用了hilt,升级到2.41就好了