简体   繁体   English

无法运行第一个PhoneGap Android应用程序

[英]Trouble getting first PhoneGap Android app to run

I'm a new user of PhoneGap. 我是PhoneGap的新用户。 My platform is Windows 7 64 bit. 我的平台是Windows 7 64位。 I've followed the instructions on the Cordova site and have Node & PhoneGap installed. 我已按照Cordova网站上的说明进行操作,并安装了Node&PhoneGap。 I already have Eclipse and the ADT installed from my previous work with developing Android apps with Java. 我以前使用Java开发Android应用程序时已经安装了Eclipse和ADT。

Following the steps at http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_android_index.md.html I'm half way through step 4. I've successfully created the my skeletal hello world PhoneGap app. 遵循http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_android_index.md.html上的步骤,我已经完成了第4步。我已经成功创建了骨骼问候世界PhoneGap应用程序。 How exactly do I make an Eclipse project out of it however? 但是,我究竟如何用它制作一个Eclipse项目呢? The generated files do not seen to include the standard Eclipse .project file. 生成的文件未包含标准的Eclipse .project文件。 It is not clear from the instructions which exact "new project" menu option to choose. 从说明中不清楚要选择哪个确切的“新项目”菜单选项。

Thanks if anyone can help. 谢谢大家的帮助。

After creating cordova project through command line, I'm assuming you have added platform using cordova platform add android 通过命令行创建cordova项目后,我假设您已使用cordova platform add android添加了平台

Then to load project into eclipse, do this 然后将项目加载到Eclipse中,执行此操作

Eclipse> file > import >Android >Existing acdroid code ..... > Root directory (Browse button...... Browse to this folder [yourcordovaproject-platforms-android] select this android folder)> Check both your project name & cordovaLib > Finish Eclipse>文件>导入> Android>现有的acdroid代码.....>根目录(浏览按钮……浏览到此文件夹[yourcordovaproject-platforms-android]选择此android文件夹)>检查两个项目名称&cordovaLib>完成

I figured it out. 我想到了。 I had jumped ahead to the "create Android app." 我跳到了“创建Android应用”。 step without having run the "cordova platform add android" step first. 步骤,而无需先运行“ cordova platform add android”步骤。 I ran the add android step, and that did generate the Eclipse project files I needed. 我运行了add android步骤,并确实生成了我需要的Eclipse项目文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM