Ionic Project Pack Android version combat

Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="font-size:14px;">recently in the team to do a front-end with IONIC+ANGULARJS web App project, because it is not done front-end, so do not know ionic, just the front-end staff is also dabbler, so only self-reliance learning to play the Android package, on-line continuous search Packaging solutions, Constantly testing constantly drop the pit and continue to solve the hole again after the solution, and finally in a day and a half time Android packaging success. Then I recorded these experiences, hoping to give you a reference and HELP. </span></p></p><p><p><br></p></p><p>Configure Ionic under Android packaging<br><br><br><span style="font-size:18px;"><span style="font-size:18px;"><strong>1. Install Node. JS</strong></span></span><br>Download Install: http://nodejs.org/<br>Open PowerShell input command node-v and npm-v Verify the installation is successful after installation is complete<br><br><br><span style="font-size:18px;"><span style="font-size:18px;"><strong>2. Install ant</strong></span></span><br>Because Ant is very difficult to install, I use brew<br><br><br>Install Brew First<br><br><br>CURL-LSSF Http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz-c/usr/local--strip 1<br><br><br>Installing wget<br>Brew Install wget<br><br><br>Installing Ant<br>Brew Install Ant<br><br><br><br><br><strong><strong><span style="font-size:18px;">3. Install Android SDK for Mac</span></strong></strong><br><br><br>Http://down.tech.sina.com.cn/page/45703.html<br><br><br>Android SDK download requires the necessary controls to be installed<br><br><br>command line access to Tools directory<br><br><br>Then enter The./android SDK out of the SDK Manager's graphical interface<br><br><br>Android SDK Manager--Preferences<br><br><br>You can refer to the Article:<br>Http://www.cnblogs.com/yjmyzz/p/4219829.html<br><br>This article is more Reliable.<br><br><br>Configure Android SDK Environment articles<br><br><br>http://blog.csdn.net/jjmm2009/article/details/29595593<br><br><br>Install the link above to complete the SDK under the MAC configuration<br><br>Configuring ANDROIDSDK Environment variables<br>Enter CD ~/into the current User's home directory<br>1. create:<br>Touch. Bash_profile<br>2. Open and Edit:<br>Open. Bash_profile<br><br><br>Configuration file:<br><br><br>Export android_home=/users/liujian/downloads/android-sdk-macosx/<br>Export path=${path}:/users/liujian/downloads/android-sdk-macosx/platform-tools:/users/liujian/downloads/ Android-sdk-macosx/tools<br><br><br>Environment Configuration Reference:<br>Http://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html<br><br><br>After the environment is configured, you need to shut down the terminal to restart a terminal.<br><br><br><br><br><br><br>After the configuration is complete, you need to verify the installation<br><br><br>ADB if the command is not found, OK<br><br><br><strong><strong><span style="font-size:18px;">4. Installing Cordova</span></strong></strong><br><br></p><p>NPM install-g Cordova<br><br><br>Installing Ionic<br>NPM install-g Ionic<br><br><br><span style="font-size:18px;"><span style="font-size:18px;"><strong>5. Deploy Android packaging Environment:</strong></span></span><br><br><br>Ionic Platform Add Android<br><br><br>Enter Ionic<br><br><br>Enter the project and directory, for Example:/users/liujian/downloads/wutongapp<br><br><br>Command:<br>Add support for Android system<br>Ionic Platform Add Android<br><br><br>Display Support Platform list information<br>Ionic Platform List<br><br><br>Show:<br>bash-3.2# Ionic Platform List<br>Updated The hooks directory to has execute permissions<br>Installed Platforms:<br>Android 5.1.1<br>iOS 3.8.0<br>Available platforms:<br>Amazon-fireos ~3.6.3 (deprecated)<br>Blackberry10 ~3.8.0<br>Browser ~4.1.0<br>Firefoxos ~3.6.3<br>OSX ~4.0.1<br>webOS ~3.7.0<br><br>To execute a package command:<br>Ionic Build Android<br><br><br><br><br><strong><strong> <span style="font-size:14px;">note: The first time you will download a lot of things, you need to wait patiently, the second time packing is fast<br></span></strong></strong><br><br>The Android package will be generated under the platforms of the Ionic project<br><br><br>Perform:<br>Ionic run Android<br><br><br><br><br><br><br>Will install the APK package to the phone, please first pick up the phone, you need to allow debugging on the phone Screen.<br><br><br><strong><strong> <span style="font-size:14px;">need to note: Ionic Project www is the App's source code will hit: platforms->android->build->outputs->apk and then hit the apk package, so to ensure the latest WWW folder, Instead of just going to replace assets under WWW file.<br></span></strong></strong><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></p><p><p><br></p></p><p><p>Ionic Project Pack Android version combat</p></p></span>

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.