首页 > 代码库 > at android.view.LayoutInflater.createViewFromTag的错误原因

at android.view.LayoutInflater.createViewFromTag的错误原因

创建对话框时出现下面的错误: 

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.equals(java.lang.Object)‘ on a null object reference
                                                                                       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:722)

经检查原来是xml中的View写成了view,导致报错。

技术分享

 

at android.view.LayoutInflater.createViewFromTag的错误原因