Getting Ionic framework running on Ubuntu

Very frustrating when it appears that Ionic setup is as simple as http://ionicframework.com/getting-started/ to get a helloworld running. But I received all kinds of errors when following those simple instructions. Primarily, there were Cordova dependencies that were missing and are not installed if you only follow Ionic instructions.

So here they are. After installing cordova and ionic

sudo npm install -g cordova

sudo npm install -g ionic

Install ADT

http://developer.android.com/sdk/index.html#download

Unzip to somewhere that makes sense for you on your home dir

Add paths

edit your .bashrc and add this to the bottom

export PATH=$PATH:/[path to adt]/adt-bundle/sdk/platform-tools:/[path to adt]/adt-bundle/sdk/tools

Save your .bashrc then run

source ~/.bashrc

Then install ant

sudo apt-get install ant

Then create a AVD

android create avd -n <name> -t <targetID>

you can list targets to see what you have available

android list targets

Now that everything else is installed and an AVD is created, you can continue with the Ionic instructions.

$ cd myApp
$ ionic platform android
$ ionic emulate android
$ ionic run android <-- still getting an error on this one

ANT_HOME

JAVA_HOME

ANDROID_HOME

PATH

配置好以上4个系统环境变量。

About 智足者富

http://chenpeng.info

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>