Error: 'ANDROID_HOME' environment variable is set to non-existent path: /root/android-sdk-linux Try update it manually to point to valid SDK directory.
Asked
Active
Viewed 9,669 times
1
-
That error message is pretty self-explaining, imho. What did you already try to solve this? – kolli Apr 13 '16 at 14:24
-
Also, you should take a look at this: http://stackoverflow.com/help/how-to-ask – kolli Apr 13 '16 at 14:34
-
Access to root folder is restricted, move the Sdk to another place. – AJchandu Nov 09 '18 at 19:04
1 Answers
1
Access to root folder is restricted.
Change the Sdk folder from /root/Android/Sdk to somewhere else. I chose /etc/Android/Sdk
sudo su
mv /root/Android /etc
Change permission
sudo chmod -R 777 /etc/Android
Then correct the path in .bashrc
sudo gedit ~/.bashrc
At the begining of the file add lines
export ANDROID_HOME=/etc/Android/Sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Check for any duplicate export statements for ANDROID_HOME, If found remove them.
Save and close .bashsrc , then source .bashrc
source ~/.bashrc
Close all open terminals. Open a fresh terminal and try your Android Sdk dependent commands.

AJchandu
- 141
- 2
- 9