0

I have created a hello world app in both android and iPhone. Both can show http://google.com. But when I try http://localhost:5555/example.html , iPhone app works but Android webview complains with webpage not available.

Is it because I'm using Dashcode to create my html5 page and use localhost from Dashcode also? If yes what should I modify to make it work for Android WebView ?

user310291
  • 36,946
  • 82
  • 271
  • 487
  • On which device is the web server you're trying to connect to running? – fhucho Mar 31 '12 at 18:35
  • 1
    [This](http://stackoverflow.com/questions/4543349/load-local-html-in-webview) will likely answer your problem. – Reed Mar 31 '12 at 19:13
  • @fhucho I'm just using simulators in both cases iOS and Android. But the server is Dashcode localhost so maybe it's safari/iphone specific ? – user310291 Apr 01 '12 at 15:51
  • localhost refers to the Android OS running in emulator but you are trying to connect to your computer. So you need to find out the IP address of your computer and use it instead of localhost. – fhucho Apr 02 '12 at 00:22

1 Answers1

0

if you you use localserver for Android like AndroPHP, root should be localhost and port number like localhost:8080 (127.0.0.1:80) than you can create your project folder under www folder and edit the path

tao_can
  • 58
  • 1
  • 7