Building a cross-platform development environment under Windows System (Cordova) + Create an Android project

Source: Internet
Author: User
Tags install node

Purpose: Build a cross-platform development Environment (Cordova) under Windows system to create an Android project

Prerequisite: Install Java JDK 1.8 or more

Android SDK 23 or more

1. Install node. js, select the appropriate version to download and install, nothing to say

Official website: http://nodejs.cn/

2. Test whether the installation was successful

Win+r key, open Run window, enter cmd, then OK, open command Line window

Input Node-v

The output version number, which indicates that node. JS installation was successful, or find the cause, or reinstall

Input Npm-v

The output version number indicates that NPM can be used, with node. JS installation, the General node. JS installation will be successful

3. Installing Cordova

Also executed at the command line

NPM install-g Cordova

Install Cordova, slow process, please wait patiently

Some networks cannot be installed successfully and will prompt for errors

You can try the command: NPM config--global set Registry http://registry.cnpmjs.org

Then execute: NPM install-g Cordova

Note: (Please ignore the direct installation pass) you need to install something else for a while, re-enter the NPM config--global set registry every time you reopen the command line window http://registry.cnpmjs.org

4. Create a cross-platform project

Go to the desired folder from the command line (do not search by yourself: cd command)

Execute in folder: Cordova create "new folder name" "Package Name" "Project name"

Example: Cordova Create Project Com.moxue.helloworld HelloWorld

In a very short time, a project is created and completed.

5. Create an Android app

Go to project folder: Execute CD Project

Execution: Cordova platform add Android

Patience is a great need.

6. Plug-in installation (a more complete blog)

Http://www.hangge.com/blog/cache/detail_1158.html

In this way, a cross-platform application is created so that it can be imported, Androidstudio or eclipse run to see

Building a cross-platform development environment under Windows System (Cordova) + Create an Android project

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.