为什么NPE抛出整理活动是什么时候?抛出、时候、NPE

由网友(伱不昰VIP,伱只昰个屁)分享简介:我有一个错误,已经快把我逼疯了好几天。不幸的是,我不能告诉你的code两个原因,我的老板不会AP preciate它和codeBase的太大分享。只要在活动结束时,会出现错误。天气这是因为我调用finish()或者因为操作系统会破坏它。现在的问题是,什么是(或可能)原因execPendingActions()的Frag...

我有一个错误,已经快把我逼疯了好几天。不幸的是,我不能告诉你的code两个原因,我的老板不会AP preciate它和codeBase的太大分享。只要在活动结束时,会出现错误。天气这是因为我调用finish()或者因为操作系统会破坏它。

现在的问题是,什么是(或可能)原因execPendingActions()的FragmentManagerImpl抛出一个NPE在行1196。

下面是堆栈跟踪:

  FragmentManagerImpl.execPendingActions()线:1196
FragmentManagerImpl $ 1.运行()线:375
Handler.handleCallback(消息)线:587
Handler.dispatchMessage(消息)线:92
Looper.loop()线:126
ActivityThread.main(字符串[])线:3997
Method.invokeNative(对象,对象[],上课,下课[],类,整型,布尔)行:不可用[本地方法]
Method.invoke(对象,对象...)线:491
ZygoteInit $ MethodAndArgsCaller.run()线:841
ZygoteInit.main(字符串[])线:599
NativeStart.main(字符串[])行:不可用[本地方法]
 

解决方案 工作中需要用到的Java知识 异常篇

您可以尝试使用compat的图书馆和调试的。

或者试图复制在减少示例应用程序。

I have an error that has been driving me crazy for days. Unfortunately, I can not show you the code for two reason, my boss will not appreciate it and the codebase is too large to share. The error occurs whenever the Activity is finishing. Weather it be because I call finish() or because the os destroys it.

The question is, what is (or could) cause execPendingActions() in FragmentManagerImpl to throw a NPE at line 1196.

Here is the stacktrace:

FragmentManagerImpl.execPendingActions() line: 1196 
FragmentManagerImpl$1.run() line: 375   
Handler.handleCallback(Message) line: 587   
Handler.dispatchMessage(Message) line: 92   
Looper.loop() line: 126 
ActivityThread.main(String[]) line: 3997    
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
Method.invoke(Object, Object...) line: 491  
ZygoteInit$MethodAndArgsCaller.run() line: 841  
ZygoteInit.main(String[]) line: 599 
NativeStart.main(String[]) line: not available [native method]  

解决方案

You could try using the compat library and debugging that.

Alternatively try and reproduce in a cut down sample app.

阅读全文

相关推荐

最新文章