我在我的活动中使用了我的对象集合.我将此集合从Activity 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
最佳答案
也许是因为你对你的意图投入了太多.例如,考虑在Application对象中使用静态字段,以便在活动之间传递大量数据.或者甚至更好的WeakHashMap.
原文链接:https://www.f2er.com/android/430508.html