简体   繁体   中英

Unable to set PATH in WebStorm for Android SDK in Apache Cordova in MAC OS

I am new to Apache Cordova and making Hybrid Applications. I have tried all the options but I am still not able to give my Android SDK Path in WebStorm (the IDE that I am using). I am using Mac Machine running on OS Mojave.

sudo export ANDROID_HOME="/Users/nabiharaza/Library/Android/sdk"
sudo export PATH="$HOME/Android/tools:$/Users/nabiharaza/Library/Android/sdk"
sudo export PATH="$HOME/Android/platform-tools:$/Users/nabiharaza/Library/Android/sdk"

I have already run these commands on the terminal. The path where my SDK is "/Users/nabiharaza/Library/Android/sdk"

Can someone help me with fixing this issue.

请参见WebStorm的图片

when you run sudo export , you won't change anything to the shell of the current user. you have to edit ~/.bashrc (or however the current user's profile would be called on OSX; just see ls -la $HOME ) and add this:

export ANDROID_HOME="/Users/nabiharaza/Library/Android/sdk"
export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin:$PATH

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM