Pass ANDROID_HOME to bazel command #102
Labels
more-data-needed
Awaiting response from issue author
product: Android Studio
Android Studio plugin
type: feature request
It is a common practice to omit path in android_sdk_repository in WORKSPACE file because typically when a repository is shared between multiple persons, and they have different install location of Android SDK, it is better to rely on ANDROID_HOME environment variable to indicate the path of the sdk.
On MacOSX, when Android Studio app is started via clicking the icon in Applications folder or launchpad, the environment doesn't respect .bash_profile or .bashrc, therefore the environment variable is not set.
There are a couple of work arounds: 1) always start the app from terminal; 2) manually modify Info.plist file of "Android Studio.app": https://superuser.com/a/541068
It is nice if the plugin can do something smarter. If there is no ANDROID_HOME environment variable, when invoking the underlying bazel command, the plugin should pass it with ANDROID_HOME set to 1) sdk location in Android Studio settings; 2) "Path variables" in the Android Studio preferences.
The text was updated successfully, but these errors were encountered: