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 6025725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:20:32+00:00 2026-05-23T04:20:32+00:00

I m getting exception as follow. Can anybody help me? 06-16 11:32:48.237: ERROR/AndroidRuntime(9223): java.lang.IllegalStateException:

  • 0

I m getting exception as follow. Can anybody help me?

06-16 11:32:48.237: ERROR/AndroidRuntime(9223):
java.lang.IllegalStateException: The specified child already has a
parent. You must call removeView() on the child’s parent first.

        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.ViewGroup.addViewInner(ViewGroup.java:1970)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.ViewGroup.addView(ViewGroup.java:1865)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.ViewGroup.addView(ViewGroup.java:1822)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.ViewGroup.addView(ViewGroup.java:1802)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at com.mVisum_philips.MainECGActivity.popupEvent(MainECGActivity.java:628)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at com.mVisum_philips.MainECGActivity$1.onClick(MainECGActivity.java:195)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.View.performClick(View.java:2408)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.view.View$PerformClick.run(View.java:8816)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.os.Handler.handleCallback(Handler.java:587)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.os.Handler.dispatchMessage(Handler.java:92)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.os.Looper.loop(Looper.java:123)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at android.app.ActivityThread.main(ActivityThread.java:4627)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at java.lang.reflect.Method.invokeNative(Native Method)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at java.lang.reflect.Method.invoke(Method.java:521)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
        06-16 11:32:48.237: ERROR/AndroidRuntime(9223):     at dalvik.system.NativeStart.main(Native Method)

Source code for screen_pop_up.xml:

<?xml version="1.0" encoding="utf-8"?>
           <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearLayout1" android:layout_height="wrap_content" android:layout_width="match_parent">
            <LinearLayout android:id="@+id/headerLin" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <RelativeLayout android:layout_height="wrap_content" android:id="@+id/relativeLayout1" android:layout_width="fill_parent">
                    <Button android:layout_width="wrap_content" android:id="@+id/button1" android:layout_height="wrap_content" android:text="Done"></Button>
                    <LinearLayout android:id="@+id/linearLayout2" android:layout_width="wrap_content" android:orientation="horizontal" android:layout_height="wrap_content" android:layout_alignParentRight="true">
                        <Button android:layout_height="wrap_content" android:background="@drawable/h_scale" android:id="@+id/button2" android:layout_width="wrap_content" android:padding="15sp"></Button>
                        <Button android:layout_height="wrap_content" android:background="@drawable/v_scale" android:id="@+id/button3" android:layout_width="wrap_content" android:padding="14sp"></Button>
                    </LinearLayout>
                </RelativeLayout>
           </LinearLayout>


        <LinearLayout android:id="@+id/linLin" android:layout_height="300sp" android:layout_width="250sp">
        </LinearLayout>
        </LinearLayout>

Source code where i m getting the exception is as follows:

final Dialog myDialog = new Dialog(MainECGActivity.this);
                myDialog.setContentView(R.layout.screen_pop_up);
                myDialog.setTitle("My Dialog");

                LinearLayout myLin = (LinearLayout) myDialog.findViewById(R.id.linLin);
                **myLin.addView(ECGField.get(0));**

                myDialog.setCancelable(true);
                Button button = (Button) myDialog.findViewById(R.id.button1);
                button.setOnClickListener(new OnClickListener() {
                @Override
                    public void onClick(View v) {
                    myDialog.dismiss();
                    }
                });

                myDialog.show();

I have gone through many threads here but I am missing something.
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-23T04:20:33+00:00Added an answer on May 23, 2026 at 4:20 am

    A view can only have a single parent. The view that you are adding (I am guessing re-using) is already part of another view hierarchy. If you really want to reuse it (I would suggest you probably dont) then you have to detach it from its parent in its existing view hierarchy.

    whatever is returned by ECGField.get(0) is already in a view hierarchy.

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

Sidebar

Related Questions

i'm getting exception on Transformer transformer = tFactory.newTransformer(StreamXSL); but the error below is not
In one of our application im getting an exception that i can not seem
in my application I am getting an exception: MyApp(38431,0xa004ffa0) malloc: *** error for object
I can't find any resources which can answer why I'm getting an error with
Im getting the follow messages in my stack trace. I can find Bluetooth Devices,
I'm trying to do java mail and im getting an error Cant send command
I am getting following exception in my php page. SoapFault exception: [HTTP] Error Fetching
I'm using JBOSS Seam 2.0 with JBoss 6 to send emails. I'm getting java.lang.UnsupportedOperationException
I'm getting this error, not really sure why. Please help, this is urgent. UPDATE
I'm getting an Exception while trying to insert a row in oracle table. I'm

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.