Handle unset $ANDROID_HOME env variable
See original GitHub issueWhen I launch sonar desktop app in mac pro, it show ‘no devices running’, but I can see the logs keep printing. Besides, I find these abnormal logs:
sonar: Requesting new client certificate from Sonar
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/sonarCA.crt
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/device.crt
sonar: Starting certificate exchange
sonar: Requesting new client certificate from Sonar
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/sonarCA.crt
sonar: ERROR: Unable to open ifstream: /data/user/0/xxxx/files/sonar/device.crt
sonar: Starting certificate exchange
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Environment variables - Android Developers
ANDROID_HOME, Sets the path to the SDK installation directory. Once set, the value does not typically change and can be shared by multiple...
Read more >Error: ANDROID_HOME is not set and "android" command not ...
Go to system properties. Click change setting. Click advance tab. Click Environment Variables button.
Read more >How to Set Path Environmental Variable for SDK in Windows?
Set ANDROID_HOME and Path Variables ; Prerequisite: ; Step 1. Right-click on 'My Computer' and select Properties. Go to Advanced system settings ...
Read more >Throwing error ANDROID_HOME is not set - Appium Discuss
Click the Advanced system settings link. Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click ......
Read more >How to set set the ANDROID_HOME environment variable in ...
The export command sets environment variables for mac. export ANDROID_HOME=/your/path/to/android. The default location is usually this.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s right, there was a recent change that went from a hardcoded sdk location to using your $ANDROID_HOME. So if you don’t have it set, you won’t see any plugins.
I think the right way to deal with this is detecting when it’s unset and telling the user this. In my opinion it would also be worth adding a fallback location or search path, so it “just works” in most cases anyway.
@jknoxville @EngleVV Just fixed ‘no device running’. Just added $ANDROID_HOME variable to ~/.bash_profile like this
export ANDROID_HOME=~/Library/Android/sdk
because method which used for fetching devices and emulators uses this command (example)
child_process.exec('$ANDROID_HOME/tools/emulator -list-avds'...)
BUT…on the prebuild app this is not working))) Only for app from src