I've debugged my app on my PC and it works fine. When I go into my phone and tablet instead of it loading the WebView
like it should it simply loads a white screen, I guess failing to load the web site. I'm not sure where to begin debugging since my debug mode and virtual device works fine. Any suggestions?
Asked
Active
Viewed 1,368 times
0

Ben
- 60,438
- 111
- 314
- 488
-
The best place to start would be to look at the messages printed by your logcat. – Phil Nov 30 '11 at 03:58
-
can u please post your webview code which is in index.html. I too got this problem. when i add in my index.html it works fine for me. May be its not solution for this. – deepa Nov 30 '11 at 04:07
2 Answers
2
A couple of suggestions based on these issues:
- Make sure you have permissions on your devices in the Manifest file:
- Make sure your devices actually have internet access
- Possibly enable javascript (i.e. mWebView.getSettings().setJavaScriptEnabled(true))
- Try loading a different URL (i.e. http://google.com) to see if that loads
- Try changing the background color to see if your content is loading, but you can't see it (i.e. mWebView.setBackgroundColor(Color.parseColor("#000000"));)
The fact that it's working locally but not on device suggests either connection issues or permissions in my opinion. The other option is that the html you're loading is corrupt and the browser on your device(s) are breaking on rendering them.

Community
- 1
- 1

Dominic Tancredi
- 41,134
- 7
- 34
- 50
-
-
Well hope the previous issues help. If it's not loading, the key is isolating the issue. – Dominic Tancredi Dec 01 '11 at 00:54
0
Does your WebView require JavaScript? If so you'll need to enable it.
webView.getSettings().setJavaScriptEnabled(true);

ciscogambo
- 1,160
- 11
- 18