为什么我得到活动暂停超时异常时,我的数据很大



我在我的活动中使用我的对象的集合。我传递这个集合从活动ActDocumentDetails到ActProductsGallery。当我的集合不是那么大时,我没有问题,但是当集合的大小足够大时,我得到这个异常:

ActivityRecord{40af3ef8 org.mabna.order/.ui.ActProductsGallery}

如何解决超时问题?

提前感谢,

11-23 09:44:21.930: I/ActivityManager(134): No longer want com.asus.weather (pid 664): hidden #16
11-23 09:44:59.990: I/ActivityManager(134): No longer want com.android.email (pid 1259): hidden #16
11-23 09:44:59.990: I/ActivityManager(134): No longer want com.asus.DLNA (pid 1251): hidden #17
11-23 09:45:00.010: W/ActivityManager(134): Scheduling restart of crashed service com.asus.DLNA/com.asus.DMS.DLNAServerService in 5000ms
11-23 09:45:00.010: W/ActivityManager(134): Scheduling restart of crashed service com.asus.DLNA/.MusicPlaybackService in 15000ms
11-23 09:45:00.020: W/ActivityManager(134): Scheduling restart of crashed service com.asus.emailwidget/.UpdateService in 24997ms
11-23 09:45:05.020: I/ActivityManager(134): Start proc com.asus.DLNA for service com.asus.DLNA/com.asus.DMS.DLNAServerService: pid=1521 uid=10055 gids={3003, 1015}
11-23 09:45:05.060: I/DMS(1521):   ===========================>   onCreate()
11-23 09:45:10.210: W/ActivityManager(134): Activity pause timeout for ActivityRecord{40af3ef8 org.mabna.order/.ui.ActProductsGallery}
11-23 09:45:10.230: W/dalvikvm(1474): threadid=1: thread exiting with uncaught exception (group=0x4028c760)
11-23 09:45:10.230: E/AndroidRuntime(1474): FATAL EXCEPTION: main
11-23 09:45:10.230: E/AndroidRuntime(1474): java.lang.NullPointerException
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.handleStopActivity(ActivityThread.java:2686)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.access$800(ActivityThread.java:122)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.os.Looper.loop(Looper.java:132)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at android.app.ActivityThread.main(ActivityThread.java:4123)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at java.lang.reflect.Method.invokeNative(Native Method)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at java.lang.reflect.Method.invoke(Method.java:491)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
11-23 09:45:10.230: E/AndroidRuntime(1474):     at dalvik.system.NativeStart.main(Native Method)
11-23 09:45:10.240: W/ActivityManager(134):   Force finishing activity org.mabna.order/.ui.ActProductsGallery
11-23 09:45:10.270: W/ActivityManager(134):   Force finishing activity org.mabna.order/.ui.ActDocumentDetails
11-23 09:45:10.280: W/ActivityManager(134): Scheduling restart of crashed service org.mabna.order/.services.SrvSmsListener in 24735ms
11-23 09:45:10.280: E/InputDispatcher(134): channel '40f237e8 org.mabna.order/org.mabna.order.ui.ActDocumentDetails (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
11-23 09:45:10.280: E/InputDispatcher(134): channel '40f237e8 org.mabna.order/org.mabna.order.ui.ActDocumentDetails (server)' ~ Channel is unrecoverably broken and will be disposed!
11-23 09:45:10.280: W/ActivityManager(134): Scheduling restart of crashed service org.mabna.order/.services.SrvDataExchange in 34735ms

可能是因为你在Intent中放了太多东西。例如,考虑在Application对象中使用静态字段,以便在活动之间传递大量数据。或者最好是WeakHashMap

相关内容

  • 没有找到相关文章

最新更新