Android command not found even PATH set

前端 未结 6 1433
南方客
南方客 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:17

    To include the SDK's tools and platform-tools directories in your PATH environment open text editor to create or modify the ~/.bash_profile file, adding below line:

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

    For Ubuntu:

    To modify the PATH variable of your system, you need to edit your .bashrc file. To do so, in a terminal, execute the following command:

    $ nano ~/.bashrc
    

    You will now have the Nano text editor enabled on the terminal. Now, at the very top of the file, enter the following:

    #AndroidDev PATH
    export PATH=${PATH}:~/android-sdk-linux/tools
    export PATH=${PATH}:~/android-sdk-linux/platform-tools
    

    Once you're finished, press CTRL + X, Y, and then hit Enter to save your changes and exit the Nano text editor.

    To reload the ~/.bashrc without re log in:

    . ~/.bashrc or source ~/.bashrc
    

    References:
    - help.ubuntu.com/community/AndroidSDK
    - How do I reload .bashrc without logging out and back in?

提交回复
热议问题