Ionic installation Process _ionic

Source: Internet
Author: User

The ionic installation process can be installed by reference to the novice tutorials as well as the tutorials on the Gitbook Yanxiaodi, with the following key steps:

Follow the instructions below to install it first, you must install the latest version of Nodejs and the Jdk1.8ø Beginner Tutorial:

The above installation process will have a large probability of installation failure, you can also ionic and Cordova separate to install,

If there is a failure to install, after all, resources in foreign countries, you know; Fortunately, there are omnipotent Taobao, can directly set up Taobao mirror source, you can use CNPM instead of NPM;

Set by: NPM ConfigSet Registry "https://registry.npm.taobao.org" (directly modifies NPM source)

NPM Config list (see NPM Settings), and then install it by the way above;

Gitbook Installation Tutorial (more detailed, recommend novice to see)

Ionic installation

Cordova Installation


Same installation failure still set NPM source for Taobao Mirror source;

You can set the node environment variables and the Android environment variables to your needs

After a successful installation, create a project:

Open the Node command line, start with the CD to the project directory, and use the Start command to create a new app:

Ionic Start Myionic2project Tutorial--v2

This command will download the project template, install NPM modules, and set Cordova information.

If you fail, you may receive the following message:

Creating Ionic app in folder E:\Workspaces\Ionic2\MyIonic2Project based on Tutorial project
Downloading:https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading:https://github.com/driftyco/ionic2-starter-tutorial/archive/master.zip
[=============================] 100% 0.0s
Installing NPM packages ...
Error with start undefined
Error initializing App:there was a error with the spawned Command:npminstall
There was a error with the spawned Command:npminstall
Caught exception:
Undefined
Mind letting us know? Https://github.com/driftyco/ionic-cli/issues

This means that NPM installation failed, you can CD to the project directory, using the previously set CNPM command: CNPM install;

Until the final output resembles the following information, the NPM modules installation was successful.

All packages Installed (319 packages installed to NPM registry, use 2m, speed 37.49kb/s, JSON 659 (4MB), Tarball 1.07MB)

Add Android,ios Platform

Ionic Platform Add Android
Ionic Platform Add iOS

Build Platform

Ionic Build Android
Ionic build iOS

The error message may be the following;


Here I deal with the way: To remove the previous Taobao mirror source, build can be successful (if not successful welcome to add)

Pre-view setup NPM Source command: NPM config list

Locate the NPM source location and then remove it, or try (not try) by command: NPM config set registry '

Build may be prompted to the JDK version is not correct, replace the corresponding; emulate run (emulator run)

Command:
Ionic emulate iOS
Ionic emulate Android

If everything is OK, the emulator will be ejected, the interface is as follows: (the interface is displayed according to the contents of its own project)

If there is a problem here, it is generally the Android simulator or the iOS emulator configuration is not configured or the simulator has not been created;

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.