question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle unset $ANDROID_HOME env variable

See original GitHub issue

When 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jknoxvillecommented, Jun 19, 2018

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.

1reaction
shechetinindcommented, Jun 19, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found