Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass ANDROID_HOME to bazel command #102

Closed
likan999 opened this issue Jun 16, 2017 · 3 comments
Closed

Pass ANDROID_HOME to bazel command #102

likan999 opened this issue Jun 16, 2017 · 3 comments
Labels
more-data-needed Awaiting response from issue author product: Android Studio Android Studio plugin type: feature request

Comments

@likan999
Copy link

likan999 commented Jun 16, 2017

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.

@omo
Copy link

omo commented Jan 18, 2019

This is same for Linux in some extent: You can (and I do) launch AS through GUI, not from the terminal.
In Linux you can set ANDROID_HOME in .profile, but I'd rather let AS+Bazel use its own Android SDK, which would be the same as the one ANDROID_HOME points in many cases.

Yet another option might be just waiting for bazelbuild/bazel#4047 being fixed.

@mai93
Copy link
Collaborator

mai93 commented Oct 18, 2022

Hello @likan999 and @omo do you still see this issue with newer versions of the plugin and the IDE?

@mai93 mai93 added the more-data-needed Awaiting response from issue author label Oct 18, 2022
@ShreeM01
Copy link
Contributor

ShreeM01 commented Jan 9, 2023

Hi there! Thank you for raising this issue. We're doing a clean up of old issues and will be closing this one since it seems to have stalled. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

@ShreeM01 ShreeM01 closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-data-needed Awaiting response from issue author product: Android Studio Android Studio plugin type: feature request
Projects
None yet
Development

No branches or pull requests

6 participants