“unfortunately API demo has stopped” - PhoneGap unaltered HelloWorld app does not run

我怕爱的太早我们不能终老 提交于 2020-02-05 03:29:10

问题



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:

  1. 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
  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!