• PhoneGap


    常用语句。

    安装好后, 

    1. 生成 APP 脚本, cordova run android。    和    cordova emulate android


    前提:

    Building for iOS

    You need the iOS SDK installed on your computer to build an iOS version of your application using the steps below.

    On the command line, make sure you are in the workshop directory and type:

    cordova build ios
    

    The project is built in the workshop/platforms/ios folder. Double-click Workshop.xcodeproj to open the project in Xcode, and run it in the emulator or on your device.

    You can also run the application in the iOS emulator directly from the command line. First install ios-sim:

    npm install -g ios-sim
    

    or

    sudo npm install -g ios-sim
    

    Then run the application in the iOS emulator:

    cordova emulate ios


    Module 1: Creating a Cordova Project

    Steps

    1. Make sure you have an up-to-date version of Node.js installed on your system.

    2. Open Terminal (Mac) or a Command window (Windows), and type the following command to install the Cordova CLI:

      npm install -g cordova
      

      or on a Mac:

      sudo npm install -g cordova
      

      If you already have Cordova installed on your computer, make sure you upgrade to the latest version:

      npm update -g cordova
      

      or

      sudo npm update -g cordova
      
    3. Navigate (cd) to a directory where you store projects on your file system.

    4. Using the Cordova CLI, create a Cordova project named Workshop in a directory named workshop:

      cordova create workshop com.yourname.workshop Workshop
      
    5. Navigate to the project directory:

      cd workshop
      
    6. Add support for the iOS platform (optional)

      To be able to build for the iOS platform, the iOS SDK must be installed on your system. If it's not, you can skip this step and add support for another platform, or simply run the tutorial application in your browser.

      1. Make sure the iOS SDK is available on your system.
      2. On the command line, make sure you are in the workshop directory and type:

        cordova platforms add ios
        
    7. Add support for the Android platform (optional)

      To be able to build for the Android platform, the Android SDK must be installed on your system. If it's not, you can skip this step and add support for another platform, or simply run the tutorial application in your browser.

      1. Make sure the Android SDK and the ant build tool are available on your system. The Android SDK is available here. Both the android and ant tools must be available in your path.
      2. On the command line, make sure you are in the workshop directory and type:

        cordova platforms add android
        
    8. Make sure you are in the workshop directory, and add basic plugins to your projects:

      cordova plugin add org.apache.cordova.device
      cordova plugin add org.apache.cordova.console
      
    9. Examine the directory structure under workshop.

      • The www folder is where you will code your HTML / JavaScript application. Open the index.html file in a browser to see the default application created by the Cordova CLI.
      • The platforms folder is where Cordova will build your application for different platforms (iOS, Android, etc). The contents of this folder will be automatically generated by the Cordova CLI, and you should never edit code in that directory.
      • Plugins are installed in the plugins directory.
      • Application parameters (name, author, etc) are stored in config.xml.




  • 相关阅读:
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name. 的解决方法
    无法打开物理文件xxx.mdf 操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120) 的解决方法
    IIS7.5 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler” 错误的解决方法
    datetime
    9.29中文词频统计
    9.26文件方式实现完整的英文词频统计实例
    9.22
    英文词频统计预备,组合数据类型练习
    9.19凯撒密码、GDP格式化输出、99乘法表
    9.15字符串基本操作
  • 原文地址:https://www.cnblogs.com/sandy_liao/p/4584227.html
Copyright © 2020-2023  润新知