乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      PhoneGap 3.0 安裝

       rui5327 2014-01-07

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

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

      到此安裝成

      設置系統(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的變量,四個都不能少,你對應這配吧
      • C:\Program Files (x86)\Java\jdk1.6.0_10\bin;

       新增 JAVA_HOME,設置值為java sdk 根目錄:

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


      下面就構建應用吧

      phonegap create hello com.helloworld.hello helloworld

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

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

      接下來,添加相應平臺

      cd hello 進入項目路徑

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

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

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

         例如在 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). 增加相應的插件java文件:C:\hello\platforms\android\src

      4). 增加相應的插件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命令,輸入不同平臺標識,生成不同平臺下的相應文件。如下以android設備為例:

             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)建應用方便多了

      如果遇到java問題,可能你要換到jdk1.6

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

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多