Hi,

I had a problem with a CalledFromWrongThreadException in thrown in a
onPostExecute part of an AsyncTaks. From the documentation the
onPostExecute part is always executed in UI thread, therefore I'm
wondering how this exception could happen.

Code looks like:

@Override
protected void onPostExecute(String result) {
progressDlg.dismiss();
onNext();
}

private void onNext() {
setContentView(R.layout.account_setup_server);
 // here the exception is thrown
....
}

Does also tried it with runOnUIThread() and handler - all the same.

The funny thing is, that this exception is only thrown sometime, in 8
of 10 runs everything works fine but in 2 the exception is thrown.

Maybe someone had a similar problem?

regards

stefan

-- 
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