Skip to content Skip to sidebar Skip to footer

Mac - Cordova Error After Installing Android Studio

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

Solution 1:

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

Post a Comment for "Mac - Cordova Error After Installing Android Studio"