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

  • SEARCH
  • Home
  • 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 3616230
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:28:26+00:00 2026-05-18T22:28:26+00:00

I am getting the below error 12-30 05:40:40.484: ERROR/AndroidRuntime(413): Uncaught handler: thread Thread-10 exiting

  • 0

I am getting the below error

12-30 05:40:40.484: ERROR/AndroidRuntime(413): Uncaught handler: thread Thread-10 exiting due to uncaught exception
12-30 05:40:40.494: ERROR/AndroidRuntime(413): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.ViewRoot.checkThread(ViewRoot.java:2629)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.ViewRoot.requestLayout(ViewRoot.java:545)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.View.requestLayout(View.java:7657)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.View.requestLayout(View.java:7657)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.View.requestLayout(View.java:7657)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.View.requestLayout(View.java:7657)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.View.requestLayout(View.java:7657)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.ViewGroup.addView(ViewGroup.java:1749)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.ViewGroup.addView(ViewGroup.java:1708)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at android.view.ViewGroup.addView(ViewGroup.java:1688)
12-30 05:40:40.494: ERROR/AndroidRuntime(413):     at com.wwwww.shout.presentationLayer.Shout$1.run(Shout.java:137)

and my code is

myProgressDialog = ProgressDialog.show(Shout.this,"","Loading...",true);

         new Thread() 
         {
         public void run()
         {
             String xml;



                 xml="<spGetUserMessages><SearchLocation></SearchLocation></spGetUserMessages>";
                 messages =parse.GetGetUserMessages(dataparsing.ILGetUserMessages(xml));
        myProgressDialog.dismiss();
((LinearLayout)findViewById(R.id.LinearlayoutMessage)).addView(iiii);


      }

    }.start();

at the time of adding views to the layout i am getting the above error.what is the wrong in this.Please give me some suggestions.Thanks in advance

  • 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-05-18T22:28:27+00:00Added an answer on May 18, 2026 at 10:28 pm

    You can use Handlers as in this example(handleMessage runs on UI thread, so there you can modify views) or for more sophisticated things, use AsyncTask (onPostExecute runs also in UI thread)

    That’s how your code should look like using Handler:

    private Handler myHandler = new Handler() {
        public void handleMessage(Message msg) {
            //in case you passed data to message (see below) here you can retrieve it
            myProgressDialog.dismiss();
            ((LinearLayout)findViewById(R.id.LinearlayoutMessage)).addView(iiii);
        }
    };
    
    private myProgressDialog = ProgressDialog.show(Shout.this,"","Loading...",true);
    
    new Thread() {
        public void run() {
            String xml;
            xml="<spGetUserMessages><SearchLocation></SearchLocation></spGetUserMessages>";
            messages = parse.GetGetUserMessages(dataparsing.ILGetUserMessages(xml));
            Message msg = myHandler.obtainMessage();
            //here you can add data to the message using msg.obj, msg.what...
            //refer to http://developer.android.com/reference/android/os/Handler.html for details
            myHandler.sendMessage(msg);
       }
    }.start();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting below error in logcat. > E/AndroidRuntime( 3197): Uncaught handler: thread main
I am getting below error that causing crash. Terminating app due to uncaught exception
I am getting below error. java.lang.NullPointerException 11-14 16:46:59.093: E/AndroidRuntime(4064): at android.content.ContextWrapper.getContentResolver(ContextWrapper.java:90) Using below code.
I have added the library ksoap2-android-assembly-2.4-jar-with-dependencies.jar but i am getting below error : Exception
I am getting below error in IE8 Do you want to view the webpage
I'm getting below error when I view the index page of my petitions controller.
while running: rake snorby:setup getting below error: rake aborted! You have already activated rake
I am getting the below error when attempting to connect to a Sybase server
I am getting the below error when executing my application on a Windows XP
i'm getting the below error, When compiling the Asp.Net web deploy project Could not

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.