问题
Note: I am a total Cordova/PhoneGap newbie (former ActionScript programmer)
Hello. I am trying to run this 101 tutorial:
http://docs.phonegap.com/en/3.5.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
It works fine until the Deploy to Emulator section, where I run this line:
$ cordova emulate android
My emulator opens, but just displays the following message:
Unfortunately, API demo has stopped
I have read all the posts here with "unfortunately API demo has stopped" in them, to no avail sadly. Being 100% new to this, I would have absolutely no idea where to start debugging.
If it helps:
- When the emulator starts, the "phone" shows a screen that reads "Connect your charger" which I get past by clicking the "menu" hardware button, at which point the "Unfortunately..." message appears; and
- there is no HelloWorld.xml file.
回答1:
I FIXED IT!!!
config.xml was missing this line:
<content src="index.html" />
来源:https://stackoverflow.com/questions/24862069/unfortunately-api-demo-has-stopped-phonegap-unaltered-helloworld-app-does-no