Cordova3.x deployment and environment setup tutorial

Source: Internet
Author: User

For cordova3.0, up to 3.6 can be used.

I. preparations:

1. Download node. js URL: http://nodejs.org/

2. Download phonegap

Open the CMD window

Windows: NPM install-G CORDOVA

Mac platform: sudo NPM install-G CORDOVA

After the installation is complete, enter Cordova-version to verify whether the installation is successful.

2. Build an android Development Environment (to avoid Chinese Directories ):

  1. Download environment jdk1.6 and Android SDK

Android SDK download URL https://developer.android.com/sdk/index.html,

FQ required

2. Configure Environment Variables

Java environment variable configuration: JDK configuration.

Android environment Configuration:

Add the following command after the system variable path:

D: \ Program Files \ ADT \ SDK \ tools;

D: \ Program Files \ ADT \ SDK \ platform-tools;

D: \ ProgramFiles \ ADT \ SDK \ eclipse \ plugins \ org. Apache. ant_1.8.3.v201301120609 \ bin

Verify whether the environment is configured successfully: ant Android-V

Here, the ADT folder is the directory of your android SDK. Replace it with your own.

Virtual Machine environment Configuration:

Because the simulator of Android is very slow to start, the external simulator performs well. I used the startup time for 10 seconds to facilitate development. Download the SDK if necessary.

Http://blog.csdn.net/psvoldemort/article/details/17165265

 

3. Create a phonegap project file:

  • Cordova create Hello com. example. Hello helloworld
  • Hello is the folder name, Com. example. Hello is the package path, and helloworld is the class name.
  • CD Hello Go To The Hello folder
  • Cordova platform add Android or Cordova platform add IOS build different platform projects with different input commands.
  • Cordova build Compilation

After the Cordova project is set up, you can directly import the android project using eclipse that comes with the android SDK. IOS can open the platform folder, which contains a proj file, which can be opened using xcode.

Download the Cordova plug-in:

Https://github.com/apacheinstallation documentation for each plug-in.

 

Iv. iOS development environment construction:

1. Installation http://tieba.baidu.com/p/2847457021 for Mac virtual machines

2. Download node. js and phonegap

3. Download xcode from the Apple Store

 

Cordova3.x deployment and environment setup tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.