我有很多不同的活动,通过ActionBarSherlock使用片段。 随机地,当我通过意图启动新活动时,我有这样的错误:
08-08 18:22:12.563: ERROR/AndroidRuntime(2029): FATAL EXCEPTION: main
java.lang.NullPointerException
at android.view.View.buildDrawingCache(View.java:6438)
at android.view.ViewGroup.onAnimationStart(ViewGroup.java:1253)
at android.view.ViewGroup.drawChild(ViewGroup.java:1499)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.View.buildDrawingCache(View.java:6500)
at android.view.ViewGroup.onAnimationStart(ViewGroup.java:1253)
at android.view.ViewGroup.drawChild(ViewGroup.java:1499)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.ViewGroup.drawChild(ViewGroup.java:1638)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367)
at android.view.View.draw(View.java:6743)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1842)
at android.view.ViewRoot.draw(ViewRoot.java:1407)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1730)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
如果有人知道如何解决它,请告诉我。感谢