CORDOVA4.0 Series--Basic Environment Construction (1)

Source: Internet
Author: User

I. Installing the node. JS Basic Environment

Official website: https://nodejs.org/

After successful installation, you can use simple commands to view its version

Node-v

NPM Related commands

Node Cli.js install NPM-GF         // installs the latest npmnode cli.js install [email protected]1.0.  // can install the specified version of NPM

Installing ant:http://ant.apache.org/

Installing git:http://git-scm.com/

Download Android SDK and development tools, now with Android Studio tools more convenient

Share an Android sdk:http://pan.baidu.com/s/1i3vjl8t

Two. Installing Cordova

Install the latest version of Cordova

NPM install-g Cordova

Install the specified version of Cordova

NPM install-g [email protected]4.0. 0

See Cordova's basic information

Update Cordova version

NPM Update Cordova-g

For more commands, please check our website.

Three. Create a solution

Specify a working directory, and then the cmd command line will always enter this directory, such as M:\Android\PhoneGap0602

CD M:\Android\PhoneGap0602

Create a solution that uses the following command, after the creation is successful

Cordova Create Bertphone Com.yourname.myapp Bertphone

  

Enter the engineering catalogue

CD Bertphone

Add support for the platform

Cordova Platforms Add Android

Add support for Plugins

Three. Eclipse Import Project Catalog

Use Eclipse to import Android projects, select the Platforms folder under directory

After successful import, Berthapp is the mobile phone can run the package, Cordovaapp-cordovalib is Cordova Core package source code

four. Cordova Introduction

Mobile development is now more hot, more popular with Android and IOS, and mobile development is divided into three kinds:

1. Original Eco-development: That is, using Android (Java) to develop, based on the Java language

2. WEBAPP: Using HTML5 + JS, based on mobile browser

3. Hybrid development: Basic and WebApp development is similar, also based on mobile browser, but can be packaged as app files

The hybrid development will be used to Cordova,cordova formerly known as PhoneGap, PhoneGap donated Apache after the change of its core renamed to Cordova, this article uses the Cordova4.0 version as the benchmark

As the version changes, the Cordova version of the difference will be different, when debugging the development of code is very inconvenient

  

CORDOVA4.0 Series--Basic Environment Construction (1)

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.