-
Notifications
You must be signed in to change notification settings - Fork 28
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
Can not find environment variables #17
Comments
Seems your OS is really new. And please try this solution, add a android local config file: |
Since i've not tested the plugin under Linux, so I'll do a research on what happened. |
Thanks for the quick reply, |
@alanpduque Hi, I had the same issue and I found a solution by creating a link of the adb executable in a directory that the OS has access by default. In my case (Ubuntu 16.04), I did: Hope that helps... |
I've do a test on an centos desktop, however the virtualbox linux is a bit outdated and i can't setup a full node.js env on it.
|
I've found the reason, by default, most people config envs following the office react native guild will edit your bashrc like this:
that's why adb can't be found, since IDEA plugin system doesn't parse ~/ as absolute path at all, so it can't found the adb command. To resolve this problem, it's really simple, replace ~ with an absolute path in your bashrc or bash_profile file, like this:
And for Elementary/Ubuntu users, double click on the launch shell, eg: bin/webstorm.sh, seems doesn't load the bashrc settings at all, so please make sure start it throw a terminal: open a terminal first, then start the IDE by typing ./webstorm.sh. I've tested this on Elementary, now all commands executes fine. |
And seems @spitoglou 's solution is the most simple one step: sudo ln -s ~/Android/Sdk/platform-tools/adb /usr/bin/adb IDEA's bug can't be fixed by me, so i'd like to let u do a test and close this bug. |
I tried openning intellij trough console and it really worked fine. |
|
When I click on the "Debug Android" button, the console gives an error saying "SDK location not found", but when I run "react-native run-android" via command line it works perfectly.
Seems like the plugin is not able to find the ANDROID_HOME environment variable set on my OS(elementary OS 0.4.1 Loki).
The text was updated successfully, but these errors were encountered: