安装Android的工作室后,科尔多瓦的错误 - MAC [英] MAC - Cordova error after installing Android Studio

查看:171
本文介绍了安装Android的工作室后,科尔多瓦的错误 - MAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OS - 科尔多瓦采空后安装Android的工作室(4.4.1)

工作

请注意:这是工作previous到安装

通过以​​下错误:

 命令Android的失败。请确保您有最新的Andr​​oid SDK安装,和Android的命令(工具/文件夹中)被添加到您的路径。

和(第一个得到解决后)

 您可能没有所需的环境或操作系统来构建这个项目


解决方案

Android的路径变化,没有被科尔多瓦更新,我不得不这样做:


  1. 更​​新路径的环境变量

    触摸〜/ .bash_profile中;打开〜/ .bash_profile中


添加行:

 出口ANDROID_SDK =/用户/ USR%%/库/ Android版/ SDK
出口ANDROID_HOME =$ ANDROID_SDK
出口ANDROID_PLATFORM_TOOLS =$ ANDROID_SDK /平台的工具
出口PATH =$ {PATH}:$ ANDROID_HOME /工具:$ ANDROID_PLATFORM_TOOLS

<醇开始=2>
平台

  • 更​​新local.properties / Andorid的平台/安卓/ CordovaLib (10号线)到

    sdk.dir = /用户/ USR%%/库/ Android版/ SDK


  • 其中,%USR%是你的用户名

    On Mac os - Cordova stoped working after installing Android Studio (4.4.1)

    NOTE: it was working previous to the installation

    With the following errors:

    The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
    

    And (After the first one was solved)

    You may not have the required environment or OS to build this project
    

    解决方案

    The android PATH changes and was not updated by the cordova, I had to do:

    1. update PATH env var

      touch ~/.bash_profile; open ~/.bash_profile

    add the lines:

    export ANDROID_SDK="/Users/%USR%/Library/Android/sdk"
    export ANDROID_HOME="$ANDROID_SDK"
    export ANDROID_PLATFORM_TOOLS="$ANDROID_SDK/platform-tools"
    export PATH="${PATH}:$ANDROID_HOME/tools:$ANDROID_PLATFORM_TOOLS"
    

    1. update local.properties under platforms/andorid and platforms/android/CordovaLib (line 10) to

      sdk.dir=/Users/%USR%/Library/Android/sdk

    where %USR% is your user name

    这篇关于安装Android的工作室后,科尔多瓦的错误 - MAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆