官方网站    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. git远程仓库创建及权限管理(二)多个项目

    本文介绍ubutu下使用gitolite实现多项目的权限管理1.安装git sudo apt-get install git 2.设置Git的user name和email: git config - ...

  2. Bootstrap-table固定表头并解决表头与内容不对齐

    写在前面: 之前在做表格的时候,一直忽略了表格的height高度,导致表格的的表头不能固定,这个样子当表格数据过多的时候,导致无法分辨表头是什么,所以决定固定表头. 固定表头需要使用height这一属 ...

  3. POJ 3422 Kaka's Matrix Travels(费用流)

    Kaka's Matrix Travels Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6792   Accepted:  ...

  4. Sys.dm_os_wait_stats Sys.dm_performance_counters

    wait_type waiting_tasks_count wait_time_ms max_wait_time_ms signal_wait_time_ms MISCELLANEOUS 0 0 0 ...

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

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

  6. AWR报告简易分析

    Snap Id Snap Time Sessions Cursors/Session Begin Snap: 35669 2012-11-8 13:00 1246 11.3 End Snap: 356 ...

  7. Fragment与Activity传递数据

    MainActivity如下: package cc.testsimplefragment0; import android.os.Bundle; import android.app.Activit ...

  8. 在Windows Server 2008 R2上安装Exchange 2013过程中遇到的一些问题

    笔者对Exchange经验非常有限, 但也正因为如此, 这里分享的东西对从没接触过Exchange的朋友会有更多的帮助吧, 至少希望如此.   1. Exchange 2013的安装需要.net fr ...

  9. jstl中取map,其中map的key是一个对象,value是一个list

    <c:forEach items="${map }" var="item"> //取得key中的属性 ${item.key.name } <c ...

  10. stylus使用文档总结:内置方法+参数+条件+迭代+导入+继承

    一.内置方法 返回各种颜色的比重(如red(color)等) 颜色函数是CSS预处里器中内置的颜色函数功能,这些功能可以对颜色值进行处理,例如颜色的变亮.变暗.渐变颜色等处理十分的方便. lighte ...