Ionic Simple touch: Windows Ionic Android development environment build

Source: Internet
Author: User

(a) Ionic Brief introduction:

First, what is ionic.

Ionic is a front-end framework for developing Hybrid/web apps based on PhoneGap and Angularjs, with other frameworks such as the Intel XDK.

Simply put your web app into a ios/android app and provide a lot of powerful services and new features outside of PhoneGap.

It still sounds tempting, in fact it's the hottest hybrid app development in the current way. Next, we'll show you how to build a ionic development environment under Windows.

Before I begin, I assume that you have understood the following concepts.

Java JDK

Apache Ant

Android SDK

NodeJS

#以上名词这里就不赘述, if there is not clear can be self-check #

(b) Installation steps:

Ionic Official Tutorial: Http://learn.ionicframework.com/videos/windows-android/

The following is a reference to the official tutorial.

1. Download the JDK and configure the Java Runtime environment

: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html (Please note select the corresponding version of your computer)

Configuration of the Java environment variable: see: http://zhidao.baidu.com/question/1366931535221381339.html

2. Download Apache Ant and add its bin directory path into the path

: Http://mirror.tcpdiag.net/apache//ant/binaries/apache-ant-1.9.4-bin.zip

After the download is done, unzip the file to a secure directory, and then add the Bin folder path in the folder to the system path environment variable, as in the C drive Program Files directory, add the following value in Path C:\Program files\  Apache-ant-1.9.4\bin; (Add method and Java configuration path variable is the same, note; separate values for each environment variable)

3. Download the Android SDK and configure the SDK runtime environment.

: http://developer.android.com/sdk/index.html here can only download Android SDK without having to download Android Studio. Download complete and install and then add two values to the system PATH environment variable. is the path to the tools directory in the Android SDK and the path to the Platform-tools, respectively. For example:

C:\Program Files (x86) \android\android-sdk\tools;

C:\Program Files (x86) \android\android-sdk\platform-tools;

Here I found that the Android SDK installation directory does not have "Platform-tools" this folder, so asked the next door of the Android development of the small partner, he said it was ADT, and then sent me his side of the environment of this folder, can be used normally.

In fact, the correct solution should be:

Run the Android.bat file under the Tools directory and then the following screen appears, tick the Android SDK platform-tools and install it.

Note: Here I downloaded the pure version of the SDK before there is no Android system, so the same as platform-tools need to check the required version here and then install. At least one system is required here, otherwise the virtual machine cannot be created. Of course, debugging with a real machine can be independent.

4. Download Nodejs for Windows and install

: https://nodejs.org/download/

Installing the NODEJS environment under Windows is simple and can be installed after downloading the correct version on the Nodejs website.

Note that the file you want to mark is in the red box.

5, using the NMP provided in the Nodejs to install Ionic and Cordova

Complete the above steps need to configure the environment to complete the setup, then only need to enter a few simple lines of command in the console to install Ionic and Cordova.

Go to the cmd window and enter the following command

$ NPM install-g Cordova

Press Enter the system will automatically install Cordova;

After the installation is finished, enter

NPM install-g Ionic

Installing Ionic

#完成以上所有步骤, you can start using ionic to quickly develop Android apps.

(iii) Create an Android project and invoke the virtual machine to run:

1. Create an App

In console input

Ionic start MyApp

The MyApp here is the name of your app.

2. Enter the Created app directory

CD MyApp

3. Choose to configure the Android environment

Ionic Platform Add Android

4. Package Build App

Ionic Build Android

5. Run the app (you need to create a new virtual machine/Connect your phone, create a new method: Open the AvD Manager.exe in the Android SDK installation directory to select New)

Ionic run Android

In this step the system will open the virtual machine to run a simple sample app.

Learn more to access Ionic website: http://ionicframework.com/for further reading.

Ionic Simple touch: Windows Ionic Android development environment build

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.