27.10.2010 14:21, Alex пишет:
Ah, I didn't know about that file (as a long time Microsoft dev, I'm
new to Android/Java/Linux).

It shows that it is my update service that is ANR, not the Configure
Activity.  I still don't understand why it works when the debugger is
attached, but it gives me a new line of enquiry.  Thanks.


A Service's onStart runs on the application's UI thread (main thread, which is used for application control flow). If this method takes too long, you'll get an ANR.

If you need to perform a lengthy operation, start a thread yourself or use an IntentService (or Mark Muphy's WakefulIntentService).

-- Kostya

On Oct 27, 3:30 am, "Bagatelle: David Lee Evans"<dle.ev...@gmail.com>
wrote:
On Oct 26, 4:25 am, Alex<maroeb...@gmail.com>  wrote:>  I have a Configure 
Activity for a simple widget.

Everything works fine with the debugger attached, but when I run the
app on a standalone device it ANRs when loading the Configure Activity
view.
It is proving difficult to debug, as with the debugger attached, it
always works fine.  The LogCat from the device shows the ANR, but
nothing else of use.  I have put log messages throughout the app, and
the OnCreate method appears to be completing, but the layout does not
display.
Any ideas? I am pulling my hair out over this one.
Alex.
What is in the /data/anr/traces.txt file?


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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