PhoneGap的部署/科尔多瓦的应用程序为Android? [英] Deploying Phonegap / Cordova app for Android?

查看:142
本文介绍了PhoneGap的部署/科尔多瓦的应用程序为Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的PhoneGap /科尔多瓦3.0应用程序,我在Android上进行测试。

I've got a Phonegap/Cordova 3.0 app that I am testing on Android.

从2.x版,科尔多瓦在很大程度上依赖命令行终端。我已经做了所有的设置的东西,我可以构建应用程序。但是有两件事都困扰着我。

Since version 2.x, Cordova relies heavily on the command-line terminal. I've done all the setup stuff and I can build the app. But two things are troubling me.

首先,一个Android项目有两个WWW文件夹。一个是[myproject的] / WWW。另一种是[myproject的] /平台/安卓/资产/ WWW。我不知道这些文件夹的时候,我修复bug进行修改。

First of all, an Android project has two www folders. One is [myproject]/www. The other is [myproject]/platforms/android/assets/www. I'm not sure which of these folders to edit when I am fixing bugs.

如果我是正确的,第一个是您使用命令行科尔多瓦建创建应用程序之前,将您的应用程序文件。然后,第二个应该是只大厦后使用副本,在部署之前。

If I am correct, the first one is where you place your app files before using the command-line "cordova build" to create the app. The second one should then be only a copy that's used after building, before deploying.

现在我的问题是,当我更改了我的应用程序,我想测试设备的,我必须使用命令行(重新)每次构建应用程序?

Now my question is, when I make a change to my app and I want to test on device, do I have to use the command line to (re)build the app every time?

推荐答案

[myproject的] / WWW 是你应该把你的源文件的目录。当你建立你的应用程序将这些文件复制到 [myproject的] /平台/ [平台] /资产/ WWW 。除此之外,文件 [myproject的] /平台/ [平台] 也复制到 [myproject的] /平台/ [平台] /资产/ WWW ,它允许你创建每个平台的覆盖您的文件。

[myproject]/www is the directory in which you should put your source files. When you build your app these files are copied in to [myproject]/platforms/[platform]/assets/www. In addition to this, files in [myproject]/platforms/[platform] are also copied to [myproject]/platforms/[platform]/assets/www, which allows you to create per-platform overrides to your files.

请注意,你应该的从不 [myproject的] /平台/ [平台] /资产/ WWW 直接,因为他们将编辑文件删除您下一次生成项目。

Note that you should never edit files in [myproject]/platforms/[platform]/assets/www directly, as they will be deleted next time you build your project.

要在您的设备使用运行项目科尔多瓦运行[平台] ,或者在模拟器上使用科尔多瓦运行模拟[平台]

To run your project on your device use cordova run [platform], or to run it on an emulator use cordova emulate [platform].

这篇关于PhoneGap的部署/科尔多瓦的应用程序为Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆