Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7914117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:00:33+00:00 2026-06-03T14:00:33+00:00

Hello i get this error in Android 3.2 and it doesn’t point to my

  • 0

Hello i get this error in Android 3.2 and it doesn’t point to my code, so i don’t know how to fix it

05-07 18:08:36.960: E/AndroidRuntime(12435): FATAL EXCEPTION: main
05-07 18:08:36.960: E/AndroidRuntime(12435): java.util.ConcurrentModificationException
05-07 18:08:36.960: E/AndroidRuntime(12435):    at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:44)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at com.google.android.maps.MapView.onDraw(MapView.java:530)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.View.draw(View.java:9304)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.drawChild(ViewGroup.java:2586)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.drawChild(ViewGroup.java:2584)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.drawChild(ViewGroup.java:2584)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.drawChild(ViewGroup.java:2584)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.View.draw(View.java:9307)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.widget.FrameLayout.draw(FrameLayout.java:419)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2076)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewRoot.draw(ViewRoot.java:1706)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewRoot.performTraversals(ViewRoot.java:1420)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.view.ViewRoot.handleMessage(ViewRoot.java:2066)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.os.Looper.loop(Looper.java:132)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at android.app.ActivityThread.main(ActivityThread.java:4126)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at java.lang.reflect.Method.invokeNative(Native Method)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at java.lang.reflect.Method.invoke(Method.java:491)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
05-07 18:08:36.960: E/AndroidRuntime(12435):    at dalvik.system.NativeStart.main(Native Method)

however this is the code that causes the error

protected ItemizedOverlay<OverlayItem> doInBackground(Void... params) {
...
synchronized (this.mapView) {//ConcurrentModificationException
                    if (!this.isCancelled())
                    {

                        for (Object element : this.mapView.getOverlays()) {
                            Overlay o  = (Overlay) element;
                            if (o instanceof GestionaleItemizedOverlay)
                            {
                                this.mapView.getOverlays().remove(o);//this one
                            }

                        }

                        if (overlay.size() > 0)
                        {
                            this.mapView.getOverlays().add(overlay);//or this one
                        }
                    }
                }
...


}

so how can i correct my code ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:00:34+00:00Added an answer on June 3, 2026 at 2:00 pm

    You cannot modify, add/remove, a List while iterating through it. The foreach loop you are using creates an Iterator object in the background. Use a regular for loop if you’d like to modify the list.

    Try the following, you should get the idea.

    List list = this.mapView.getOverlays();
    for(int i = 0:i<list.size();i++){
        Overlay o  = (Overlay) list.get(i);
        if (o instanceof GestionaleItemizedOverlay)
        {
            this.mapView.getOverlays().remove(o);//this one
        }
    }
    

    Here is a more accurate solution specific to MapView overlays.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I get a weird error in this code: function validateForm(aform) { var s=;
I tried running a python script: print Hello, World! And I get this error:
Hello not sure why Im getting this error. Basically I get it in these
Hello you naughty code animals.. I have tried to get this code to work,
I got this code in my submit form <form id=myform action='hello.php' method='GET'> <input type=button
Hello this is code snippet which i get from Jquery Ajax based search I
Hello android developers, I was struggling to get this work but failed and now
Hello I get this error every time I'm trying to open an activity java.lang.VerifyError:
Hello I am new at Haskell and i'm having problems trying to get this
Hello I'm trying to archive an iOS app. I get this: warning: Application failed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.