I am stuck with an ConcurrentModificationException and I Can’t figure out where this happens in my code. All that Debug gives me is this:
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)
ConcurrentModificationExceptionoccurs when you are modifying a collection while iterating over it. At this point it’s probably easier to just search for a foreach loop where you are changing the collection.