gpt4 book ai didi

java - 如何找出这个ConcurrentModificationException崩溃的地方?

转载 作者:行者123 更新时间:2023-12-01 05:33:18 26 4
gpt4 key购买 nike

我遇到了 ConcurrentModificationException 问题,并且无法弄清楚代码中发生这种情况的位置。调试给我的就是:

myApp [Android Application] 
DalvikVM[localhost:8631]
Thread [<1> main] (Suspended (exception ConcurrentModificationException))
ViewRoot.draw(boolean) line: 1631
ViewRoot.performTraversals() line: 1329
ViewRoot.handleMessage(Message) line: 1944
ViewRoot(Handler).dispatchMessage(Message) line: 99
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]
Thread [<8> Binder Thread #2] (Running)
Thread [<7> Binder Thread #1] (Running)
Thread [<9> AsyncTask #1] (Running)
Thread [<10> AsyncTask #2] (Running)
Daemon Thread [<12> RefQueueWorker@org.apache.http.impl.conn.tsccm.ConnPoolByRoute@40770068] (Running)
Thread [<11> AsyncTask #3] (Running)

最佳答案

ConcurrentModificationException 当您在迭代集合时修改集合时会发生。此时,仅搜索要更改集合的 foreach 循环可能会更容易。

关于java - 如何找出这个ConcurrentModificationException崩溃的地方?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8624430/

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