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
and platforms/android/CordovaLib
(line 10) to
sdk.dir=/Users/%USR%/Library/Android/sdk
where %USR% is your user name
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.