Подтвердить что ты не робот

Android Stringblock.get Исключение NullPointer на Lollipop

Я получаю крах на Android Lolipop.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.res.StringBlock.get(int)' on a null object reference   
at android.content.res.AssetManager.getResourceValue(AssetManager.java:213) 
at android.content.res.Resources.getValue(Resources.java:1334)  
at android.content.res.Resources.getValue(Resources.java:1323)  
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2796) 
at android.content.res.Resources.getLayout(Resources.java:1143) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:412)

Как правило, происходит раздувание представления. Любые предложения, почему это происходит только на Lollipop?

4b9b3361

Ответ 1

Это может быть из-за атрибута null.

Например, андроид: foreground = "? android: attr/selectableItemBackground" может быть нулевым, попробуйте использовать android: foreground = "? attr/selectableItemBackground".