Attempt to invoke virtual method ' int android.view.View.getImportantForAccessibility () '

Source: Internet
Author: User

Recently in the Do and list or the GridView related display appeared a problem, tidy up ideas, share out for everyone to refer to:

In fact, whether it is a ListView or a GridView may appear, and the reason is basically the same;

Short Msg:java.lang.NullPointerException
Long Msg:java.lang.NullPointerException:Attempt to invoke virtual method ' int Android.view.View.getImportantForAccessibility () ' On a null object reference//Build label:lenovo/passion/passion : 5.1.1/lmy47v/vibeui_v2.8_1530_5.200.1_st_p1c72:user/release-keys//Build Changelist:vibeui_v2.8_1530_5.200.1_st _p1c72//Build time:1437513185000//Java.lang.NullPointerException:Attempt to invoke virtual method ' int android.view.v Iew.getimportantforaccessibility () ' On a null object reference//at Android.widget.AbsListView.obtainView ( abslistview.java:2363)//at Android.widget.GridView.makeAndAddView (gridview.java:1433)//AT Android.widget.GridView.makeRow (gridview.java:361)//at Android.widget.GridView.fillDown (gridview.java:302)//AT Android.widget.GridView.fillFromTop (gridview.java:437)//at Android.widget.GridView.layoutChildren (Gridview.java : 1276)//at android.widget.AbsListView.onWindowFocusChanged (abslistview.java:2974)//AT Android.view.View.dispatchWindowFocusChanged (view.java:8714)//at android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1056)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//AT Android.view.ViewGroup.dispatchWindowFocusChanged (viewgroup.java:1060)//at android.view.viewrootimpl$ Viewroothandler.handlemessage (viewrootimpl.java:3309)//at Android.os.Handler.dispatchMessage (handler.java:102)/ /at Android.os.Looper.loop (looper.java:135)//at Android.app.ActivityThread.main (activitythread.java:5380)//AT Java.lang.reflect.Method.invoke (Native Method)//at Java.Lang.reflect.Method.invoke (method.java:372)//At Com.android.internal.os.zygoteinit$methodandargscaller.run ( zygoteinit.java:939)//at Com.android.internal.os.ZygoteInit.main (zygoteinit.java:734)
This way add a connection, because I find that the same reason that gallery appears,
The reason for this is that the GetView method of the corresponding adapter returns NULL, which appears as a null pointer phenomenon.
The solution is the same: look straight here.
http://blog.csdn.net/sex_34/article/details/47751273

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Attempt to invoke virtual method ' int android.view.View.getImportantForAccessibility () '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.