7
down vote
accepted

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!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-11-06
  • 2021-04-25
  • 2021-09-28
  • 2021-12-18
  • 2021-11-07
猜你喜欢
  • 2021-08-14
  • 2021-09-02
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
相关资源
相似解决方案