2020国产成人精品视频,性做久久久久久久久,亚洲国产成人久久综合一区,亚洲影院天堂中文av色

分享

PhoneGap 3.0 安裝

 rui5327 2014-01-07

3.0是通過nodejs安裝的,不像以前的版本有安裝包

  1. 下載nodejs
  2. 在環(huán)境變量里看是否配置了nodejs,然后在cmd轉(zhuǎn)到C盤根目錄下,輸入npm install phonegap. 即安裝phonegap

到此安裝成

設(shè)置系統(tǒng)變量

 系統(tǒng)變量 Path后面添加:

  • D:\Program Files\ADT\sdk\tools;
  • D:\Program Files\ADT\sdk\platform-tools;
  • D:\Program Files\ADT\sdk\eclipse\plugins\org.apache.ant_1.8.3.v201301120609\bin配的是ant.bat的變量,四個都不能少,你對應(yīng)這配吧
  • C:\Program Files (x86)\Java\jdk1.6.0_10\bin;

 新增 JAVA_HOME,設(shè)置值為java sdk 根目錄:

  C:\Program Files (x86)\Java\jdk1.6.0_10\


下面就構(gòu)建應(yīng)用吧

phonegap create hello com.helloworld.hello helloworld

 第一個參數(shù)hello表示項目文件夾名,在此文件夾下會生成www子目錄作為主頁面存入目錄,包括有css,js和img資源。 其中config.xml包括了重要的資源描述和項目配置信息.

   第2個參數(shù)是可選的,com.vmeitime.hello表示項目包名; 第3個參數(shù):HelloWord表示顯示的文本;

接下來,添加相應(yīng)平臺

cd hello 進入項目路徑

為項目添加插件,然后再生成不同平臺下的項目.

添加插件(需要先安裝git工具 https://help.github.com/articles/set-up-git):

   PhoneGap 3.0 最需要關(guān)注的是完全的插件體系結(jié)構(gòu),所有的功能特性包括攝像頭等都是使用插件方式提供。也就是說新建項目后很多功能是無法使用的,你必須將其對應(yīng)的插件添加到項目中。

   例如在 cordova 中添加插件的方法是:

       cordova plugin add https://git-wip-us./repos/asf/cordova-plugin-camera.git

   而通過 phonegap 命令行工具的方法是:

       phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-camera.git

   這意味著在開始 PhoneGap 項目時你要先考慮項目需要什么功能,然后通過命令行來添加這些功能。

1). 添加的插件都將放在C:\hello\plugins目錄下.

2). 同時會在所有平臺下的config.xml文件中增加feature插件配置,如:C:\hello\platforms\<平臺>\res\xml\config.xml)

3). 增加相應(yīng)的插件java文件:C:\hello\platforms\android\src

4). 增加相應(yīng)的插件js文件:C:\hello\platforms\android\assets\www\plugins

下面是完整的插件列表,我直接拷貝過來,可能會有變化:

   Basic device information (Device API):

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

   Network Connection and Battery Events:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-network-information.git

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-battery-status.git

   Accelerometer, Compass, and Geolocation:

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

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

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-geolocation.git

   Camera, Media playback and Capture:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-camera.git

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-media-capture.git

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-media.git

   Access files on device or network (File API):

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-file.git

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-file-transfer.git

   Notification via dialog box or vibration:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-dialogs.git

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-vibration.git

   Contacts:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-contacts.git

   Globalization:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-globalization.git

   Splashscreen:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-splashscreen.git

   Open new browser windows (InAppBrowser):

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-inappbrowser.git

   Debug console:

       $ phonegap local plugin add https://git-wip-us./repos/asf/cordova-plugin-console.git


運行build命令,輸入不同平臺標識,生成不同平臺下的相應(yīng)文件。如下以android設(shè)備為例:

       c:\hello> phonegap build android

   要查看詳細(verbose)執(zhí)行過程,可增加命令參數(shù)-V :

       c:\hello> phonegap -V build android

   之后可以看到C:\hello\platforms\android里出現(xiàn)Android項目。



下面你就導入進eclipse 編輯吧

是不是比以前創(chuàng)建應(yīng)用方便多了

如果遇到j(luò)ava問題,可能你要換到j(luò)dk1.6

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多