在Mac OS上 - Cordova在安装Android Studio(4.4.1)后停止工作
注意:它在安装之前工作
出现以下错误:
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.
并且(在第一个解决之后)
You may not have the required environment or OS to build this project
答案 0 :(得分:0)
android PATH更改并且没有被cordova更新,我必须这样做:
更新PATH env var
touch~ / .bash_profile;打开〜/ .bash_profile
添加以下行:
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"
将platforms/andorid
和platforms/android/CordovaLib
(第10行)下的local.properties更新为
sdk.dir = /用户/%USR%/库/的Android / SDK
其中%USR%是您的用户名