如何在Ubuntu上安装Ionic框架? [英] How to install Ionic framework on Ubuntu?
问题描述
我正在使用Ubuntu 14.04版本。我想使用Ionic为Android构建应用程序。我找不到安装Ionic的确切解决方案。
I am using Ubuntu 14.04 version. I would like to use Ionic to build app for Android. I couldn't find exact solution to install Ionic.
推荐答案
请参阅Cordova平台指南这里和Ionic安装指南这里,但我突出了Ubuntu的关键步骤。
See the Cordova Platform Guide here and the Ionic Installation Guide here, but I'm highlighting the key steps for Ubuntu.
-
安装JDK 8.(此部分取自这个问题)。
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
安装node.js 0.12。 NodeSource安装Ubuntu和co。的指南
从 Google 。 (稍后我会将您安装的文件夹称为 where-you-unpacked-the-sdk
。)
Install Android Studio and the Android SDK from Google. (I will refer to the folder where you install as where-you-unpacked-the-sdk
later.)
使用终端,安装Ionic CLI和相关工具。
Using a terminal, install the Ionic CLI and related tools.
sudo apt-get install git ruby
sudo gem install compass
sudo npm install -g cordova ionic grunt-cli bower gulp
将Android SDK添加到PATH并正确设置ANDROID_HOME环境变量。使用〜/ .bash_profile
这是通常的做法。
echo "export ANDROID_HOME=/where-you-unpacked-the-sdk/sdk" >> ~/.bash_profile
echo "export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> ~/.bash_profile
source ~/.bash_profile
开始使用Ionic!
Start using Ionic!
ionic start todo example
cd example
ionic platform add android
ionic run android
这篇关于如何在Ubuntu上安装Ionic框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!