Android SearchView android.graphics.drawable..Drawable.setState(int[])' on a null object reference
2017-10-17 11:28
1061 查看
java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean android.graphics.drawable.Drawable.setState(int[])’ on a null object reference
解决方案:
去掉 : android:queryBackground=”@null”
去掉 : android:stateListAnimator=”@null”
相关文章推荐
- [Android] android.app.Activity.findViewById(int) on a null object reference
- android.view.View android.view.View.findViewById(int)' on a null object reference
- Attempt to read from field 'int android.graphics.Rect.bottom' on a null object reference
- 'int android.graphics.Bitmap.getWidth()' on a null object reference
- void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
- Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
- Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
- void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
- ApplicationThread android.app.ActivityThread.getApplicationThread()' on a null object reference
- Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference(Fb)
- android.support.v4.app.FragmentHostCallback.getHandler()' on a null object reference
- void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
- findViewById出现错误View.isRootNamespace()' on a null object reference
- Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null o
- android.widget.LinearLayout.addView(android.view.View)' on a null object reference
- Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setAlpha(int)' on a null o
- Attempt to invoke virtual method 'void android.app.ActionBar.hide()' on a null object reference
- oid android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference的解决
- 关于Attempt to invoke virtual method 'HSSFCell.getCellType(int)'' on a null object reference
- Object android.content.Context.getSystemService(java.lang.String)' on a null object reference