Dreamweaver CC and cordova.js

拜拜、爱过 提交于 2019-12-11 07:16:46

问题


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?


回答1:


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.

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.

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

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

As far as phonegap functionality is concerned, you might need to instal some plugins as described here.

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

You may also want to have a look here.

Sources: 1, 2



来源:https://stackoverflow.com/questions/22100000/dreamweaver-cc-and-cordova-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!