-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SmartRefreshLayout自定义RefreshHeader时,报java.lang.NoSuchMethodException的错误 #34
Comments
收到,我处理一下 |
1.1.6上修复了这个问题,将关闭issue,感谢你的反馈 |
收到,新的gralde插件问题,我查一下 |
已经修复,可以升级到新版本 1.1.8 |
@hi-dhl 哈喽,1.1.8 提示了这个,是一定需要升级到 Java 11 吗? |
可以先使用 1.1.5 的版本 1.1.6 以后的版本只是修改了 ViewGroup 初始化的问题,应该不会影响你这边的使用 这个错很奇怪,你当前的使用的 JDK 1.8 吗? |
是的,项目的 JDK 版本是 1.8,没有升级到 11 的打算。 |
使用1.1.5报错,改成1.1.8又出现了这个问题。 |
因为升级gradle 7的原因,所以 1.1.8 需要升级到 java 11, 这个问题我统一处理一下, 另外 1.1.5 出现什么错了,方便贴一下吗 |
自定义view使用binding报错如下:
|
这个问题,新版本已经修复了,可以拉起一下最新的代码 |
可以更新最新的版本, JDK的 问题已经修复了 |
升级到1.1.5版本之后,SmartRefreshLayout自定义RefreshHeader时,报java.lang.NoSuchMethodException的错误:
Caused by: java.lang.NoSuchMethodException:com.xxx.xxx.databinding.LayoutCommonRefreshHeaderBinding.inflate [class android.view.LayoutInflater, class android.view.ViewGroup]
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getMethod(Class.java:1693)
at com.hi.dhl.binding.ReflectExtKt.inflateMethodWithViewGroup(ReflectExt.kt:21)
at com.hi.dhl.binding.viewbind.ViewGroupViewBinding.(ViewGroupViewBinding.kt:36)
查看源码源码发现1.1.5版本viewbind扩展方法强制要求传入viewGroup引起的,自定义的RefreshHeader是通过addview方式添加进SmartRefreshLayout里面的。viewbind改回不传入viewGroup方式可正常使用,建议增加viewGroup可空的方法。
The text was updated successfully, but these errors were encountered: