安装Android的工作室后,科尔多瓦的错误 - MAC [英] MAC - Cordova error after installing Android Studio
问题描述
在Mac OS - 科尔多瓦采空后安装Android的工作室(4.4.1)
工作请注意:这是工作previous到安装
通过以下错误:
命令Android的失败。请确保您有最新的Android SDK安装,和Android的命令(工具/文件夹中)被添加到您的路径。
和(第一个得到解决后)
您可能没有所需的环境或操作系统来构建这个项目
Android的路径变化,没有被科尔多瓦更新,我不得不这样做:
-
更新路径的环境变量
触摸〜/ .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:
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"
update local.properties under
platforms/andorid
andplatforms/android/CordovaLib
(line 10) tosdk.dir=/Users/%USR%/Library/Android/sdk
where %USR% is your user name
这篇关于安装Android的工作室后,科尔多瓦的错误 - MAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!