PhoneGap的3.0与Android 0.2的工作室 [英] PhoneGap 3.0 with Android studio 0.2

查看:198
本文介绍了PhoneGap的3.0与Android 0.2的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对如何使用Android Studio开发的PhoneGap 3.0移动应用程序的问题。我们都知道,Android的工作室用于编写Android原生移动应用程序,但是,它也假设开发PhoneGap的应用程序。

I had question on how to use Android Studio to develop PhoneGap 3.0 mobile application. We all know that Android Studio is used to write native mobile application for android, however, it also supposes to develop PhoneGap app.

的PhoneGap是一个自由和开源框架,允许你创建
  使用标准化的API的网络移动应用
  平台,您所关心的。

PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about.

所以基本上我需要编写HTML,CSS和JavaScript的PhoneGap应用程序,然后PhoneGap的-CLI构建工具的编译 JavaScript的一些的原始的$ C $,以C至在Android或iOS设备上运行。例如,如果我跑当地的PhoneGap构建Android ,然后一个新的目录将在平台上创建和生成所有的Andr​​oid相关的文件。但我不认为编辑或更改平台目录下的任何文件,对吧?

So basically I need to write HTML, CSS and JavaScript for PhoneGap app then phonegap-cli build tool compile the JavaScript to some native code in order to run on android or ios devices. For example if I run phonegap local build android, then a new directory will be created under platform and all android relevant files were generated. But I don't suppose to edit or change any files under platform directory, right?

因此​​,如何能我想使用Android Studio开发PhoneGap的应用程序?或者我怎能想阐述的Andr​​oid工作室在我的开发流程?

So how can I suppose to use Android Studio to develop PhoneGap application? Or how shall I suppose to elaborate Android Studio in my development workflow?

我由安德鲁·特莱斯但阅读本文章在没有运气我的Andr​​oid 0.2工作室和PhoneGap的3.0。

I read this article by Andrew Trice but with no luck on my Android Studio 0.2 and phonegap 3.0.

请帮助。

推荐答案

由安德鲁·特莱斯文章建议编辑在

The article by Andrew Trice suggests to edit "www" files under

project-root/platforms/android/assets/www

但是这是不正确的,因为如果你想开发多平台​​,您必须编辑在

but this is not correct, because if you want to develop for multiple platform, you must edit "www" files under

project-root/www

如果你想打开使用Android Studio中的PhoneGap项目,你可以先遵循安德鲁建议的所有步骤,,然后添加到Studio项目中的项目根/ WWW 文件夹导入过程并没有找到:

If you want to open a Phonegap project using Android Studio, you can initially follow all the steps suggested by Andrew, then add to the Studio project the project-root/www folder that the import procedure did not found:


  1. 项目

  2. 开启菜单File /项目结构

  3. 在左边栏中选择模块

  4. preSS添加内容根,选择文件夹的项目根/ WWW

  5. 在窗口的最右边部分,选择新的文件夹,preSS来源

  6. preSS OK,你会看到在项目结构的正确www文件夹。

BUT 有一个限制:Android的Studio不支持javascript和CSS编辑,这样你就可以编辑这些类型的文件为简单的文本文件的: - (

BUT there is a limitation: Android Studio doesn't support javascript and CSS editing, so you can edit these kind of files as simple text files :-(

这篇关于PhoneGap的3.0与Android 0.2的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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