adb command not found in linux environment

前端 未结 21 1242
有刺的猬
有刺的猬 2020-12-07 19:07

While implementing the BluetoothChat application .apk inside G1 device, it always pops up a message:

$adb install -r /home/parveen/workspace/BluetoothChat/bi         


        
相关标签:
21条回答
  • 2020-12-07 19:29
    Follow these steps:
    
    Set android vars
    
    Initially go to your home and press `Ctrl + H` it will show you hidden files now look for .bashrc file, open it with any text editor
    

    then place the lines below at the end of file:

    export ANDROID_HOME=/myPathSdk/android-sdk-linux
    export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    
    
    Now Reboot the system
    
    It Works!
    
    0 讨论(0)
  • 2020-12-07 19:30

    In Ubuntu i could run the following command:

      sudo apt install android-tools-adb
    
    0 讨论(0)
  • 2020-12-07 19:34

    NOTE: while using adb on Linux you'll need to type ./adb to execute adb commands unless you create a path in ~/.bashrc. In a terminal write:

    sudo gedit ~/.bashrc

    Add the following line at the end of the file. Once you're done, save and exit.

    Android tools

    export PATH=~/Development/adt-bundle-linux/sdk/platform-tools:~/Development/adt-bundle-linux/sdk/tools:$PATH

    Then in a Terminal run this command to reload your .bashrc: Code:

    source ~/.bashrc

    Now you can just run adb without put ./ before every command.

    0 讨论(0)
提交回复
热议问题