概述
SwipeBackActivity 滑动关闭视图 在小米4 api23 6.0手机手机滑动直接闪退
报错 如下 :
07-19 10:00:08.398 14724-14724/com.lvche.lvchedingdang E/PushFactory: getPushInstance not found push instance.
07-19 10:00:08.436 14724-14724/com.lvche.lvchedingdang E/MscSpeechLog: getMscParameter MSC return -1
07-19 10:00:08.948 14724-14802/com.lvche.lvchedingdang E/SMACK-Voe: enter JNI_OnLoad
07-19 10:00:19.147 14724-14724/com.lvche.lvchedingdang E/SysUtils: ApplicationContext is null in ApplicationStatus
07-19 10:00:19.287 14724-14724/com.lvche.lvchedingdang E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
07-19 10:00:19.315 14724-14724/com.lvche.lvchedingdang E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
07-19 10:00:19.322 14724-15010/com.lvche.lvchedingdang E/ActivityThread: Failed to find provider info for com.google.settings
07-19 10:00:36.051 14724-14724/com.lvche.lvchedingdang E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.lvche.lvchedingdang, PID: 14724
java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15158)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:282)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:288)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:323)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2635)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2454)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2087)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1127)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6038)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
at android.view.Choreographer.doCallbacks(Choreographer.java:672)
at android.view.Choreographer.doFrame(Choreographer.java:608)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
引用以下正文 来源于 :
http://blog.csdn.net/u011515165/article/details/49001433
在做动画是碰到这个错误,后面发现是我在加动画图片这边也在移除动画,
- 10-09 15:07:15.400: E/AndroidRuntime(10878): FATAL EXCEPTION: main
- 10-09 15:07:15.400: E/AndroidRuntime(10878): Process: com.geometry, PID: 10878
- 10-09 15:07:15.400: E/AndroidRuntime(10878): java.lang.NullPointerException: Attempt to read from field 'int android.view.View.mViewFlags' on a null object reference
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3198)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.updateDisplayListIfDirty(View.java:14056)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.getDisplayList(View.java:14084)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.updateDisplayListIfDirty(View.java:14021)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.getDisplayList(View.java:14084)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.updateDisplayListIfDirty(View.java:14021)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.getDisplayList(View.java:14084)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3389)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3368)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.updateDisplayListIfDirty(View.java:14021)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.View.getDisplayList(View.java:14084)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:266)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:272)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:311)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2550)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2388)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2019)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1075)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5853)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.Choreographer.doCallbacks(Choreographer.java:580)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.Choreographer.doFrame(Choreographer.java:550)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.os.Handler.handleCallback(Handler.java:739)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.os.Handler.dispatchMessage(Handler.java:95)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.os.Looper.loop(Looper.java:135)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at android.app.ActivityThread.main(ActivityThread.java:5336)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at java.lang.reflect.Method.invoke(Native Method)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at java.lang.reflect.Method.invoke(Method.java:372)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
- 10-09 15:07:15.400: E/AndroidRuntime(10878): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
解决办法
new Handler().post(new Runnable() {
public void run() {
parent.removeView(imageView);
}
});
最后
以上就是激动钢铁侠为你收集整理的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所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复