且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

[错误:无法找到'ANDROID_HOME'环境变量。尝试手动设置

更新时间:2022-10-31 09:19:22

I don't think its necessary to add everything into path.Just add the JAVA_HOME , ANDROID_HOME and ANT_HOME to path and point out the corresponding bin directory as:

For android studio

add this into your ~/.bashrc file:

1.export ANDROID_HOME=/path/to/android/studio
2.export PATH=$PATH:$ANDROID_HOME/bin

you can do the same for Ant.

For java jdk

add this into your /etc/profile file:

1.JAVA_HOME=/path/to/jdk
2.JRE_HOME=$JAVA_HOME/jre
3.PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
4.export JAVA_HOME
5.export JRE_HOME
6.export PATH

Now in your terminal, type echo $PATH and make sure all the environment variables are added to the PATH!

相关阅读

技术问答最新文章