gpt4 book ai didi

android - 为什么我的数据很大时会出现Activity暂停超时异常?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:49:20 24 4
gpt4 key购买 nike

我在我的 Activity 中使用我的对象的集合。我将此集合从 Activity ActDocumentDetails 传递到 ActProductsGallery。当我的收藏不是很大时,我没有问题,但是当收藏的大小足够大时,我得到了这个 execption:

ActivityRecord 的 Activity 暂停超时{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 对象中有一个静态字段,用于在 Activity 之间传递大量数据。或者更好的 WeakHashMap

关于android - 为什么我的数据很大时会出现Activity暂停超时异常?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8238100/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com