官方网站    http://ionicframework.com

然后在Get Start里面可以了解到,安装Ionic需要安装 Node.js. 文件来源 http://www.tuicool.com/articles/VJBnIvahttp://blog.nodejs.org/2014/09/16/node-v0-10-32-stable/

弄下来之后,双击安装。然后启动cmd或command,运行 npm install -g cordova ionic 命令,执行日志:

ionic platform add android



百度问题:http://www.tuicool.com/articles/F7RJNf
把android_home修改好,并且把android sdk下的文件改成可读写(点击sdk右键,然后把只读去掉),继续

在windons 7 上竟然搞不定,回来在mac上继续...

源文件for mac:http://pan.baidu.com/s/1hqxLLqs

安装成功

进入路径:打开command 直接输入 cd /usr/local/bin 回车就进入了上面的目录路,ls下就可以看到了。

安装ionic:打开command 直接输入 sudo npm install -g cordova ionic (可能需要输入admin权限的密码)

Password:
Sorry, try again.
Password:
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
cordova@4.0. /usr/local/lib/node_modules/cordova
├── q@0.9.
├── underscore@1.4.
├── nopt@2.2. (abbrev@1.0.)
└── cordova-lib@4.0. (osenv@0.0., properties-parser@0.2., bplist-parser@0.0., mime@1.2., semver@2.0., unorm@1.3., shelljs@0.3., dep-graph@1.1., npm@1.3., elementtree@0.1., xcode@0.6., rc@0.3., npmconf@0.1., glob@3.2., tar@0.1., request@2.22., plist@1.0., d8@0.4., cordova-js@3.7.) ionic@1.2. /usr/local/lib/node_modules/ionic
├── connect-livereload@0.4.
├── progress@1.1.
├── colors@0.6.
├── open@0.0.
├── ncp@0.4.
├── q@1.0.
├── shelljs@0.2.
├── cross-spawn@0.2. (lru-cache@2.5.)
├── connect@3.1. (utils-merge@1.0., parseurl@1.3., finalhandler@0.1., debug@1.0.)
├── finalhandler@0.2. (escape-html@1.0., debug@2.0.)
├── optimist@0.6. (wordwrap@0.0., minimist@0.0.)
├── npm@2.1.
├── event-stream@3.0. (stream-combiner@0.0., duplexer@0.1., from@0.1., pause-stream@0.0., map-stream@0.0., split@0.2., through@2.3.)
├── form-data@0.1. (mime@1.2., async@0.9., combined-stream@0.0.)
├── xml2js@0.4. (sax@0.6., xmlbuilder@2.4.)
├── request@2.27. (json-stringify-safe@5.0., aws-sign@0.3., forever-agent@0.5., qs@0.6., tunnel-agent@0.3., oauth-sign@0.3., cookie-jar@0.3., node-uuid@1.4., mime@1.2., hawk@1.0., http-signature@0.10.)
├── unzip@0.1. (setimmediate@1.0., match-stream@0.0., readable-stream@1.0.-, pullstream@0.4., fstream@0.1., binary@0.3.)
├── serve-static@1.6. (utils-merge@1.0., escape-html@1.0., parseurl@1.3., send@0.9.)
├── tiny-lr-fork@0.0. (debug@0.7., faye-websocket@0.4., qs@0.5., noptify@0.0.)
├── prompt@0.2. (revalidator@0.1., pkginfo@0.3., read@1.0., winston@0.6., utile@0.2.)
├── archiver@0.5. (lodash@2.4., readable-stream@1.1., lazystream@0.1., file-utils@0.1., zip-stream@0.1.)
└── vinyl-fs@0.3. (graceful-fs@3.0., lodash@2.4., mkdirp@0.5., strip-bom@1.0., vinyl@0.4., through2@0.6., glob-watcher@0.0., glob-stream@3.1.)

ionic start myApp sidemenu

RubertdeMacBook-Pro:~ Rubert$  ionic start myApp sidemenu
Creating Ionic app in folder /Users/Rubert/myApp based on sidemenu project Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] % .0s Downloading: https://github.com/driftyco/ionic-starter-sidemenu/archive/master.zip
[=============================] % .0s Update config.xml
Initializing cordova project
Fetching plugin "org.apache.cordova.device" via plugin registry
npm http GET http://registry.cordova.io/org.apache.cordova.device
npm http http://registry.cordova.io/org.apache.cordova.device
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.device/-/org.apache.cordova.device-0.2.12.tgz
npm http http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.device/-/org.apache.cordova.device-0.2.12.tgz
Fetching plugin "org.apache.cordova.console" via plugin registry
npm http GET http://registry.cordova.io/org.apache.cordova.console
npm http http://registry.cordova.io/org.apache.cordova.console
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.console/-/org.apache.cordova.console-0.2.11.tgz
npm http http://cordova.iriscouch.com/registry/_design/app/_rewrite/org.apache.cordova.console/-/org.apache.cordova.console-0.2.11.tgz
Fetching plugin "com.ionic.keyboard" via plugin registry
npm http GET http://registry.cordova.io/com.ionic.keyboard
npm http http://registry.cordova.io/com.ionic.keyboard
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.ionic.keyboard/-/com.ionic.keyboard-1.0.3.tgz
npm http http://cordova.iriscouch.com/registry/_design/app/_rewrite/com.ionic.keyboard/-/com.ionic.keyboard-1.0.3.tgz Your Ionic project is ready to go! Some quick tips: * cd into your project: $ cd myApp * Setup this project to use Sass: ionic setup sass * Develop in the browser with live reload: ionic serve * Add a platform (ios or Android): ionic platform add ios [android]
Note: iOS development requires OS X currently
See the Android Platform Guide for full Android installation instructions:
https://cordova.apache.org/docs/en/edge/guide_platforms_android_index.md.html * Build your app: ionic build <PLATFORM> * Simulate your app: ionic emulate <PLATFORM> * Run your app on a device: ionic run <PLATFORM> * Package an app using Ionic package service: ionic package <MODE> <PLATFORM> For more help use ionic --help or visit the Ionic docs: http://ionicframework.com/docs

ionic platform add android

RubertdeMacBook-Pro:~ Rubert$ ionic platform add android
Current working directory is not a Cordova-based project.
RubertdeMacBook-Pro:~ Rubert$ cd myApp/
RubertdeMacBook-Pro:myApp Rubert$ ionic platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.myapp971999
Name: myApp
Android target: android-
Copying template files...
Project successfully created.
Running command: /Users/Rubert/myApp/hooks/after_prepare/010_add_platform_class.js /Users/Rubert/myApp
add to body class: platform-android
Installing "com.ionic.keyboard" for android
Installing "org.apache.cordova.console" for android
Installing "org.apache.cordova.device" for android

ERROR for ant

RubertdeMacBook-Pro:myApp Rubert$ ionic build android
Running command: /Users/Rubert/myApp/hooks/after_prepare/010_add_platform_class.js /Users/Rubert/myApp
add to body class: platform-android
Running command: /Users/Rubert/myApp/platforms/android/cordova/build /Users/Rubert/myApp/platforms/android/cordova/node_modules/q/q.js:
throw e;
^
Error: Failed to run "ant -version", make sure you have ant installed and added to your PATH.
at /Users/Rubert/myApp/platforms/android/cordova/lib/check_reqs.js::
at ChildProcess.exithandler (child_process.js::)
at ChildProcess.emit (events.js::)
at maybeClose (child_process.js::)
at Process.ChildProcess._handle.onexit (child_process.js::)
Error: /Users/Rubert/myApp/platforms/android/cordova/build: Command failed with exit code
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js::)
at ChildProcess.emit (events.js::)
at maybeClose (child_process.js::)
at Process.ChildProcess._handle.onexit (child_process.js::)

解决问题参考:http://blog.sina.com.cn/s/blog_877e9c3c0101qs87.html

不过在Mac也需要android sdk的,这个是前提,sdk(资源部一定有效):http://blog.csdn.net/teresa502/article/details/7392818

我是直接和配置Android环境变量一样配置的,配置:http://www.cnblogs.com/leehongee/archive/2013/09/16/3323844.html

然后直接  ionic build android 日志为:http://www.cnblogs.com/royi123/p/4044682.html

ionic emulate android

生成日志:http://www.cnblogs.com/royi123/p/4044692.html

如果是想装PhoneGap环境的 运行 npm install -g phonegap

ionicframework(一)的更多相关文章

  1. ionicframework I ------------- 初体验

    ionicframework I -------------  初体验 Create hybrid mobile apps with the web technologies you love. Fr ...

  2. ionicframework(二)

    Start building with Ionic! Follow these quick steps and start building high quality mobile apps in m ...

  3. ionic2+angular2中踩的那些坑

    好久没写什么东西了,最近在做一个ionic2的小东西,遇到了不少问题,也记录一下,避免后来的同学走弯路. 之前写过一篇使用VS2015开发ionic1的文章,但自己还没摸清门道,本来也是感兴趣就学习了 ...

  4. Win10 UWP开发系列:使用VS2015 Update2+ionic开发第一个Cordova App

    安装VS2015 Update2的过程是非常曲折的.还好经过不懈的努力,终于折腾成功了. 如果开发Cordova项目的话,推荐大家用一下ionic这个框架,效果还不错.对于Cordova.PhoneG ...

  5. HTML5学习总结-番外03 Angular Ionic

    一 Angular Angular使用了MVVC设计模式,MVVC在概念上是真正将页面与数据逻辑分离的模式,它把数据绑定工作放到一个JS里去实现,而这个JS文件的主要功能是完成数据的绑定,即把mode ...

  6. Mac下安装ionic和cordova,并生成iOS项目

    为了开发HTML5,除了最新使用React Native等之外,目前首选的为稳定的ionic+Angularjs来开发iOS和android. Ionic(ionicframework一款接近原生的H ...

  7. 搭建 AngularJS+Ionic+Cordova 开发环境并运行一个demo

    目前的手机APP有三类:原生APP,WebAPP,HybridApp:HybridApp结合了前两类APP各自的优点,越来越流行. Cordova就是一个中间件,让我们把WebAPP打包成Hybrid ...

  8. 【转载】用Ionic开发hybrid APP

    使用phonegap开发APP的优劣在此不必细说,快速,简单,跨平台,以及随着iOS,Android本身对webview优化所带来的不错的性能,便是其独有的优势.而且私以为在目前激烈而又变化快速的移动 ...

  9. VS2015+cordova+ionic安装配置

    VS2015已经出了正式版,想用来试一下cordova方面的开发.最近在看ionic这个框架,于是想能在VS2015里编辑js就好了. 下面说一下蛋疼的安装配置过程. 一.安装VS2015及Andro ...

随机推荐

  1. 34、Flask实战第34天:修改邮箱

    修改邮箱页面布局 新建cms/cms_resetemail.html {% extends 'cms/cms_base.html' %} {% block title %}修改邮箱-CMS管理系统{% ...

  2. Codeforces 961E 主席树

    题意: 给出一个n个数的序列,求有几对(i,j)满足a[i]>=j&&a[j]>=i,(i,j)和(j,i)只能算一对. 考虑第i个数会有几个j(j<i)满足条件,首 ...

  3. 【BFS】【余数剪枝】Multiple

    [poj1465]Multiple Time Limit: 1000MS   Memory Limit: 32768K Total Submissions: 7731   Accepted: 1723 ...

  4. 【枚举】【并查集】Gym - 101243F - Vitamins

    题意:有n片药,有三种颜色,白色比红色重,红色比蓝色重,给你一些它们之间的重量关系,比如1>3,2=4之类,问你它们的颜色,如果没法判断的输出?. 先并查集把等于号全缩起来,然后按照大于号建图, ...

  5. 【高精度】【找规律】Gym - 101243B - Hanoi tower

    题意:给你一个经典的汉诺塔递归程序,问你最少几步使得三个柱子上的盘子数量相同.(保证最开始盘子数量可以被3整除) 规律:ans(n)=2^(2*n/3-1)+t(n/3). t(1)=0. t(n)= ...

  6. 【FFT】HDU4609-3 idiots

    ..退化为一天两题了,药丸.. [题目大意] 给出n根木棍的长度,求从其中取出3根能组成三角形的概率. [思路] 然后枚举求前缀和,枚举最长边.假设最长边为l,先求出所有两边之和大于它的情况数.然后减 ...

  7. ssm框架整合快速入门

    写在前面: 公司一直都是使用ssh框架(Struts2,Spring,Hibernate)来开发,但是现在外面的公司大多数都是使用的ssm框架,所以也有必要多学习一下外面的新技术.这里就快速搭建一个小 ...

  8. iptables的框架

    参考 : https://segmentfault.com/a/1190000002540601           SNAT: 网关上,POSTROUTING链上,报文出去的时候处理,适用:内网多台 ...

  9. ER TO SQL语句

    ER TO SQL语句的转换,在数据库设计生命周期的位置如下所示. 一.转换的类别 从ER图转化得到关系数据库中的SQL表,一般可分为3类: 1)转化得到的SQL表与原始实体包含相同信息内容.该类转化 ...

  10. .Net 有关程序集查找与加载的一点反思

    最近在做一款叫VICA产品,此产品采用了插件机制,插件在运行中加载,插件与插件之间存在依赖关系,所有的插件DLL为方便管理都放置在Plugins的文件夹下统一管理.这种处理方式不自觉的就让我想了解cl ...