zoukankan      html  css  js  c++  java
  • Android sdk 安装(ionic)

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

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

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

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

    安装后  配置环境变量:

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

    新建变量名               变量值

    ANDROID_HOME     D:ionicandroidsdk(你sdk的路径)

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

    ;%ANDROID_HOME%platform-tools;%ANDROID_HOME% ools

    执行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(开启服务调试)

  • 相关阅读:
    简单实用的Asp.net生成静态页方法
    第八章 、数据存储 Stroe
    第七章 、使用表格控件
    第九章 、 TreePanel
    mysql 安装时的第三第四步出错解决方法
    asp.net 水晶报表 VS2008 10.5版本
    关于log4net的使用
    SQL2000时安装挂起的解决方法
    linux下安装Sublime Text3并将它的快捷方式放进启动器中和卸载Sublime
    Linux下安装配置jdk
  • 原文地址:https://www.cnblogs.com/dlgood/p/6888699.html
Copyright © 2011-2022 走看看