简体   繁体   English

如何使用PhoneGap和HTML Editor创建一个简单的应用程序但不使用Eclipse?

[英]How to create a simple app using PhoneGap and HTML Editor but without using Eclipse?

I am just starting off with PhoneGap. 我刚刚开始使用PhoneGap。 I have HTML, CSS & JavaScript knowledge. 我有HTML,CSS和JavaScript知识。

So far, I have only installed PhoneGap & Android SDK on my Ubuntu machine. 到目前为止,我只在我的Ubuntu机器上安装了PhoneGap和Android SDK。

How should I proceed from here? 我该怎么办? I do not want to use Eclipse. 我不想使用Eclipse。 I would like to use text editors like Sublime to edit my HTML/CSS/JS files of the project and then upload it on PhoneGap Build to create the app. 我想使用像Sublime这样的文本编辑器来编辑项目的HTML / CSS / JS文件,然后将其上传到PhoneGap Build来创建应用程序。

Can someone help me with step by step instructions? 有人可以帮我逐步说明吗? I have already tried the PhoneGap's documentations and other resources online. 我已经在线尝试过PhoneGap的文档和其他资源。 But different websites point to different ways of doing things. 但不同的网站指向不同的做事方式。

You can use ( Command lines ) 你可以使用( 命令行

phonegap create hello com.example.hello HelloWorld

It will generate a project for you. 它将为您生成一个项目。 In this project, you will have different folders. 在此项目中,您将拥有不同的文件夹。 The one you're interested in is "www" which contains your index, css and js files and your config.xml. 您感兴趣的是“www”,其中包含您的索引,css和js文件以及您的config.xml。

You can start from here to create your application using any text editor. 您可以从这里开始使用任何文本编辑器创建应用程序。

To build this app, just zip the www folder and upload it to Phonegap build. 要构建此应用程序,只需压缩www文件夹并将其上传到Phonegap构建。

Hope it helps ! 希望能帮助到你 !

You can simply create an index.html, confix.xml, css, js files, zip and upload to PG build. 您可以简单地创建index.html,confix.xml,css,js文件,zip并上传到PG构建。 I do this, and while testing I use Ripple emulator to see what the app looks like on device in my browser. 我这样做,在测试时我使用Ripple模拟器在我的浏览器中查看应用程序在设备上的样子。 The PG Build docs can help you out with your config.xml PG Build文档可以帮助您使用config.xml

Also, you can use a framework like jQuery Mobile to build a quick app. 此外,您可以使用像jQuery Mobile这样的框架来构建快速应用程序。 Search "jquery mobile phonegap tutorial" and you can get something up and running pretty quick. 搜索“jquery mobile phonegap教程”,您可以快速获得并运行。

You can use whatever text editor you want. 您可以使用您想要的任何文本编辑器。 Eclipse is one of the supported IDEs by Google. Eclipse是Google支持的IDE之一。 It is used to build your Android app. 它用于构建您的Android应用程序。

You can use Phonegap Build if you want. 如果需要,您可以使用Phonegap Build。 Phonegap Build will compile your code for you. Phonegap Build将为您编译代码。 You should use this template here for your code to be run through Build. 您应该在此处使用此模板以便通过Build运行代码。

The easiest way to use Build is to place your code in a Github Repo. 使用Build的最简单方法是将代码放在Github Repo中。 Then create/login to your Build account. 然后创建/登录您的Build帐户。 Then select to create an app. 然后选择创建一个应用程序。 Build will ask you to either input your gitup link (if you added your github account info to your build account there will be a drop down you can select from) or to upload a zip file. 构建将要求您输入您的gitup链接(如果您将github帐户信息添加到您的构建帐户,将有一个下拉列表,您可以选择)或上传一个zip文件。

Build will ask what platforms you want to build for ios, android, or windows. Build会询问你想为ios,android或windows构建什么平台。 You need a ios certificate if you want to build for ios. 如果你想为ios构建,你需要一个ios证书。 Android will build without a certificate. Android将在没有证书的情况下构建。 You will need to add a certificate if you want to deploy to the market. 如果要部署到市场,则需要添加证书。

Build will also ask if you want to enable debug and hydration. Build还会询问您是否要启用调试和水合作用。 For debug you will need to add the debug plugin to your project. 对于调试,您需要将调试插件添加到项目中。 When you run your app on your phone you can click debug and use weinre. 当您在手机上运行应用程序时,可以单击调试并使用weinre。 Hydration allows you to update your code without re-downloading your app. Hydration允许您更新代码而无需重新下载应用程序。 If you update your code and rebuild the project the next time you open your app on your phone it will ask if you want to update your app. 如果您下次在手机上打开应用程序时更新代码并重建项目,则会询问您是否要更新应用程序。

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

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