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.

Advertisements

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 reflecting on the past three years and reading the article on divided self aptly showing up at the top of my tweeter feed. 1 week ago
  • is having a nice feeling of connecting dots all over the place. they are now illuminating the same point. 2 months ago
  • Style Transfer is fun! TensorFlow rocks! #WTM17 https://t.co/zYP0IFIDfp 3 months ago
  • couldn't get over the jetlag, sleeping during the day from seven to four, for days. 5 months ago
  • is emptying trash and happily discovering the available disk space now ranks at 100G+. 6 months 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: