1. 程式人生 > >at android.view.LayoutInflater.createViewFromTag的錯誤原因

at android.view.LayoutInflater.createViewFromTag的錯誤原因

檢查 mta string bject 報錯 except .com view com

創建對話框時出現下面的錯誤:

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的錯誤原因