I've run into an interesting problem that I think I've narrowed down to a 
regression bug in (at least) the latest version of the Android SDK, and I'm 
hoping someone here can help me confirm it.

The trace of the crash is this:

[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): 
java.lang.IllegalStateException: The specified child already has a parent. 
You must call removeView() on the child's parent first.
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.view.ViewGroup.addViewInner(ViewGroup.java:2929)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.view.ViewGroup.addView(ViewGroup.java:2824)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.view.ViewGroup.addView(ViewGroup.java:2804)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
com.android.internal.app.AlertController.setupView(AlertController.java:401)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
com.android.internal.app.AlertController.installContent(AlertController.java:241)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.app.AlertDialog.onCreate(AlertDialog.java:314)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.app.Dialog.dispatchOnCreate(Dialog.java:335)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
android.app.Dialog.show(Dialog.java:248)
[54329.978265]  05-28 22:49:34.190 E/AndroidRuntime( 7974): at 
name.udell.convertor.ProConvertActivity.onKeyDown(ProConvertActivity.java:473)

.. where the final line above is in my code, a call to AlertDialog.show(). 
The code leading up to that point is inflating a custom dialog from a layout 
XML resource; the interesting thing is that it was working fine in the 
previous release of the app, and a code compare confirms that it hasn't 
changed in the interim. However, this previous release was built on Feb 28, 
so it was definitely built with an earlier release of the SDK. I can't swear 
if it was built with r9 or 10.

What I'm hoping is that somebody here still has an installation of r9 or r10 
in place that they can try this on, to confirm my suspicion about the nature 
of this bug. It's quite easy to reproduce; the last example at 
http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog (the 
Java in the final code block) will do it. Or, I can easily send a minimal 
test project too.

Thanks... I'm off to try and work around it now.

String


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to