Dependent Origination

Application Error when Loading up an Android App

Posted on: May 13, 2011

adb logcat looks like this:

05-13 15:59:31.715  5738  5749 I System.out: onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///android_asset/www/index.html

an error dialog also pops up on the device screen.

note:

1. this only happens on working with an actual device. never on emulator.

2. it happens two out of three times of running the app on the device, for example. one out of three runs, let’s say, can be successful (with the app up and running).

reason: timeout value exceeded when loading url

solution: [set the time out value before loading url]

super.onCreate(savedInstanceState);
–>super.setIntegerProperty(“loadUrlTimeoutValue”, 60000);<–
super.loadUrl(“file:///android_asset/www/index.html”);

at least now three out of three runs are all successful (with the app up and running).

don’t ask me why an intial 20 seconds are not good enough. and why someone would need a 60 seconds time out value.

2 Responses to "Application Error when Loading up an Android App"

Thank you! It worked for me!!

Thank you! It works!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

May 2011
M T W T F S S
« Apr   Jun »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Twitter

  • is emptying trash and happily discovering the available disk space now ranks at 100G+. 4 days ago
  • is looking at other people's intentions, not their capabilities, and feeling much happier every day :) 11 months ago
  • is planning on how to spend the next two weeks until the new year, at home. 11 months ago
  • is going to have human company for Thanksgiving; a rare event for the past like twenty years. 1 year ago
  • living by myself again; a strange feeling in a bustling city with thirteen million people 1 year ago

Flickr Photos

IMG_3517

IMG_3515

IMG_3505

IMG_3497

IMG_3261

IMG_3260

IMG_3255

IMG_2736

IMG_2733

IMG_2629

More Photos
%d bloggers like this: