WebStrom: ANDROID_HOME is not set and "android" command not in your PATH

Hi,
I got this message when I run my app,
I tried to set PATH:
export ANDROID_HOME=/Users/fabricio/Library/Developer/Xamarin/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
in terminal, and it's works, but When I run my app in webstrom, this failed:

/usr/local/bin/cordova run --emulator android
Running command: /Users/fabricio/code/cordova/hello/platforms/android/cordova/run --emulator
ERROR: Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.
Error: /Users/fabricio/code/cordova/hello/platforms/android/cordova/run: Command failed with exit code 2
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)

1 comment
Comment actions Permalink

Please try running WebStorm from terminal - does the problem persist?


1

Please sign in to leave a comment.