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

 java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference
        at android.widget.AbsListView.obtainView(AbsListView.java:2377)
        at android.widget.ListView.makeAndAddView(ListView.java:1868)
        at android.widget.ListView.fillDown(ListView.java:702)
        at android.widget.ListView.fillFromTop(ListView.java:763)
        at android.widget.ListView.layoutChildren(ListView.java:1677)
        at android.widget.AbsListView.onLayout(AbsListView.java:2161)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:1915)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:581)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1734)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1588)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1497)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:581)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1734)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1588)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1497)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:581)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
        at android.view.View.layout(View.java:15733)
        at android.view.ViewGroup.layout(ViewGroup.java:5050)
        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2157)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1910)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1105)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6189)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:793)
        at android.view.Choreographer.doCallbacks(Choreographer.java:606)
        at android.view.Choreographer.doFrame(Choreographer.java:575)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:779)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5601)
        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:964)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)

 

原因Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null_第1张图片

 

 

 

你可能感兴趣的:(#,android,疑难杂症)