intellij IDEA phonegap/cordova plugin – Cannot detect android SDK in path

Since I have had several asks about that. I just place my answer here.

I suppose that you already prepared Android SDK, JDK, PhoneGap/Cordova/Ionic etc. All this stuff has good manuals about download and setup.

But when you add or edit Run/Debug configuration for the PhoneGap/Cordova plugin you can see the warning – “Cannot detect android SDK in path”

The most answers, I saw recommends adding changes to the .bashrc file

But you forgot that you already have .profile file

Since most applications read .profile just duplicate

export ANDROID_HOME="/here/path/to/the/Android/Sdk"
export PATH=$PATH:$ANDROID_HOME
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

in the .profile

Then run in console

source /path/to/the/.profile

And restart IDEA (perhaps this step is superfluous)
That’s it

Leave a Reply

Your email address will not be published. Required fields are marked *