Android command not found even PATH set

前端 未结 6 1430
南方客
南方客 2021-01-05 01:24

hi i am using ubuntu 12.04. and in ~/.bashrc file I set following things

export ANDROID_HOME=/home/nilkash/Downloads/android-sdk-linux/platform-tools

6条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 02:04

    Environment variables can be defined permanently by editing the .profile file in your home directory. Here's how:

    Edit your .profile file with a command like gedit ~/.profile. Append this to the end of the file:

    export ANDROID_SDK_HOME=/home/nilkash/Downloads/android-sdk-linux/platform-tools
    

    You can source .profile to make it apply right away. Each time you restart your system, the .profile file is loaded, restoring this setting.

    OR

    This below method works 100% for me on Ubuntu 12.04:

    • Start the terminal

    • $gedit .bashrc

    • Add the below line at the enc of the file:

      PATH=$PATH:/home/nilkash/Downloads/android-sdk-linux/platform-tools/

    Note: gedit must be performed only on .bashrc and NOT on .bashrc~

    Please do accept the answer if it works for you.

提交回复
热议问题