view v = LayoutInflater.from(this).inflate(R.layout.activity_main, null);
出现警告:void passing null as the view root (needed to resolve layout parameters on the inflated layout's root element)
这时需要使用如下代码来代替
LayoutInflater.from(this).inflate(R.layout.activity_main, parent, false);
最后
以上就是可爱汽车最近收集整理的关于android中调用inflate时出现的警告错误处理的全部内容,更多相关android中调用inflate时出现内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复