I have MacOS with IntelliJ Idea installed. I\'m using Gradle (gradle-2.4) for building the project. I have NodeJS and NPM installed on the Mac and available from the shell.
The answer is this is trivial it turns out. Solution is applicable to ANY application.
The reason for the error is that none of the visual apps on Mac OS X use a user shell so whatever you have in your local profile settings such as ~/.bash_profile
simply does not take when Studio is launched. There is a good workaround:
cd /Applications/Android Studio.app/Contents/MacOS
studio_app
(or whatever is your executable name)mv $executable$ $executable$_app
$executable$
, and populate it like this. Here I am using my bash_profile
.#!/bin/sh
. ~/.bash_profile
logger "`dirname \"$0\"`/$executable$_app"
exec "`dirname \"$0\"`/$executable$_app" $@
chmod +x $executable$
And that is it. Relaunch Studio app normally and now it has inherited all your settings from bash_profile
, including path to node etc.
Substitute $executable$
with the name of your exe file. For Android Studio it would be just studio. For IntelliJ it should be just intellij (double check).