码迷,mamicode.com
首页 > 移动开发 > 详细

Android sdk 安装(ionic)

时间:2017-05-22 13:42:30      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:try   rem   nic   新建   daemon   led   配置环境   htm   log   

http://www.jianshu.com/p/5df88764f024

http://www.jianshu.com/p/b9757a5bcb07

首先更新了JDK直接在原目录安装 在改一下 环境变量  即检测成功。

安装Android sdk 如图 有显示成功  有的安装底高两个版本:

技术分享

技术分享

安装后  配置环境变量:

技术分享技术分享

我的电脑 - 右键属性 - 高级系统设置 - 环境变量

新建变量名               变量值

ANDROID_HOME     D:\ionic\androidsdk(你sdk的路径)

然后在path里添加(注意前面的分号)

;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools

执行android -h看到命令即安装设置成功


2)执行androidsdk目录下的SDK Manager.exe即可打开工具包(若打不开,请用管理员权限运行!);

最后用项目测试打包 apk  出现了报错

 1 For example, an unrecognized jvm option is used.
 2 Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
 3 2.14.1/userguide/gradle_daemon.html
 4 Please read the following process output to find out more:
 5 -----------------------
 6 Error occurred during initialization of VM
 7 Could not reserve enough space for 2097152KB object heap
 8 
 9 
10 * Try:
11 Run with --stacktrace option to get the stack trace. Run with --info or --debug
12 option to get more log output.
13 
14 Error: cmd: Command failed with exit code 1 Error output:
15 FAILURE: Build failed with an exception.
16 
17 * What went wrong:
18 Unable to start the daemon process.
19 This problem might be caused by incorrect configuration of the daemon.
20 For example, an unrecognized jvm option is used.
21 Please refer to the user guide chapter on the daemon at https://docs.gradle.org/
22 2.14.1/userguide/gradle_daemon.html
23 Please read the following process output to find out more:
24 -----------------------
25 Error occurred during initialization of VM
26 Could not reserve enough space for 2097152KB object heap

解决办法;

技术分享

最后用个心项目 后 打包 在手机上运行成功。

常用命令:

npm install -g cnpm --registry=https://registry.npm.taobao.org(npm镜像源指向淘宝)

cnpm install -g cordova ionic(安装cordova ionic)

cnpm update -g cordova ionic(更新cordova ionic)

ionic -help(查看帮助)

ionic -v(查看版本)

ionic start myApp blank(空项目)

ionic start myApp tabs(带导航条)

ionic start myApp sidemenu(带侧滑菜单)

ionic platform add android(添加android平台)

ionic platform remove android(移除android平台)

ionic build android(编译项目apk)

ionic emulate android(运行项目apk 手机连接在手机运行 模拟器连接在模拟器运行)

ionic run android(相当于build + emulate)

ionic serve(开启服务调试)

 

Android sdk 安装(ionic)

标签:try   rem   nic   新建   daemon   led   配置环境   htm   log   

原文地址:http://www.cnblogs.com/dlgood/p/6888699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!