You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
在android 11 level 30的某些机型上有"Fragment " + this + " did not return a View from onCreateView() or this was called before onCreateView().”异常。 #37
Activity
censhengde commentedon Nov 18, 2021
附:我是在DialogFragment onActivityCreated方法中第一次引用ViewBinding字段的
DylanCaiCoding commentedon Nov 18, 2021
看描述是使用属性委托的用法吧,这是通过 Fragment 构造函数传入布局去 onCreateView() 的,按理来说只要布局没有漏传应该不会出现这个问题才对。有没有完整点的代码来康康吗?
censhengde commentedon Nov 19, 2021
排查出来的,不是库的问题,是fragment状态问题,我在异步回调中使用binding操作了视图,而此时fragment已经销毁。
Optimize exception message in fragments #37
DylanCaiCoding commentedon Nov 19, 2021
已发布 1.2.6 版本优化该报错信息,在 Fragment 销毁后获取 binding 对象会报 "The binding property has been destroyed" 方便排查问题。