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!

posted on 2017-06-14 16:16  袁晓平  阅读(1868)  评论(0编辑  收藏  举报