Dreamweaver的CC和cordova.js [英] Dreamweaver CC and cordova.js

查看:346
本文介绍了Dreamweaver的CC和cordova.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次建立一个Android应用程序,我使用Dreamweaver CC和PhoneGap的构建。当你开始从头构建一个应用程序的Dreamweaver中的所有必要的文件,jQuery的增加,但不包括cordova.js文件。我的第一个问题是,我需要把它列入我的体型?第二个问题是,当我尝试包括cordova.js文件的最新版本,我得到4实时取景提示框来了:

This is my first time building an Android app and I'm using Dreamweaver CC and PhoneGap Build. When you start building an app from scratch Dreamweaver adds in all the necessary jQuery files but doesn't include a cordova.js file. My first question is do I need to include it in my build? Second question is when I try to include the latest version of the cordova.js file I get 4 live view prompt boxes coming up with:

gap:["PluginManager","startup","PluginManager703133838"]
gap:["Device","getDeviceInfo","Device703133839"]
gap:["NetworkStatus","getConnectionInfo","NetworkStatus703133840"]
gap:["App","show","App703133841"]

任何人都知道他们是什么意思?

Anyone know what they mean?

推荐答案

实际上 cordova.js 是必要的,当你通过构建PhoneGap的和太,你并不需要添加 cordova.js 手工它是自动生成的,当你运行PhoneGap的创建脚本。

Actually cordova.js is necessary when you build through PhoneGap and in that too, you do not need to add the cordova.js manually it is auto-generated when you ran the PhoneGap create script.

如果您正在使用的PhoneGap构建CLI工具(我觉得这是最简单的方法),那么你并不需要包括cordova.js或它们被添加在项目www目录手动phonegap.js文件由PhoneGap的构建工具自动完成。

If you are using phonegap build CLI utility (which I find is the easiest way), then you don't need to include the cordova.js or phonegap.js files manually in the www directory in the project as they are added by the phonegap build utility automatically.

您确实需要添加下面尽管所有的HTML文件:

You do need to add the following though in all html files:

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>

至于PhoneGap的功能而言,你可能需要安装装配一些插件所描述的这里

例如,如果你想添加的加速度功能,你必须输入下面的命令,而在PhoneGap的项目目录:

For example if you want to add the accelerometer functionality you would have to enter the following command while in the phonegap project directory:

$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion.git

您可能还需要看看这里

来源:
<一href=\"http://stackoverflow.com/questions/19358968/cordova-js-for-android-phonegap-application\">1, <一href=\"http://stackoverflow.com/questions/12986645/phonegap-startup-do-we-need-all-those-files\">2

这篇关于Dreamweaver的CC和cordova.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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