I'm just getting started to cordova.
I've created an application using
cordova create androidTest
and then
cd androidTest
cordova platform add android
cordova prepare
cordova build
and at last,
cordova serve android
which says
Static file server running at
=> http://0.0.0.0:8000/
CTRL + C to shutdown
When I open it, the only thing I get is:
404 Not Found
Why? What am I doing wrong? Did I get the meaning of cordova serve command wrong?
I am supposed to see some kind of "application" that is "rendered" in Chrome, don't I?
(using 3.1.0-0.1.0 )
Yes, I got stung by this too.
The correct behaviour now seems to be to just run
cordova serve
and then you can navigate to
localhost:8000/<platform>/www/index.html
where platform is 'android' in your case. It doesn't seem to automatically route to index.html any more so you need to include that part of the url explicitly. There's a cordova bug here although I couldn't find any documentation on this.
Clarification:
Cordova launches a server that listens on all available IP addresses on port 8000. That is what the message means when it says it's running on "0.0.0.0:8000". It doesn't mean the server is literally running on 0.0.0.0.
0.0.0.0 is not a valid IP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With