新安装Ubuntu ,第一次安装android SDK,输入命令后出现not found.
~$ adbNo command 'adb' found, did you mean: Command 'cdb' from package 'tinycdb' (main) Command 'gdb' from package 'gdb' (main) Command 'dab' from package 'bsdgames' (universe) Command 'zdb' from package 'zfs-fuse' (universe) Command 'mdb' from package 'mono-debugger' (universe) Command 'kdb' from package 'elektra-bin' (universe) Command 'tdb' from package 'tads2-dev' (multiverse) Command 'pdb' from package 'python' (main) Command 'jdb' from package 'openjdk-6-jdk' (main) Command 'ab' from package 'apache2-utils' (main) Command 'ad' from package 'netatalk' (universe)adb: command not found
没有配置,需进行配置。
vim .bashrc
然后添加下面内容:
export ANDROID_HOME=/home/jerikc/tools/android/android-sdk-linuxexport PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
然后运行
. .bashrc
$ adb Android Debug Bridge version 1.0.29 -d - directs command to the only connected USB device returns an error if more than one USB device is present. -e - directs command to the only running emulator. returns an error if more than one emulator is running. -s- directs command to the USB device or emulator with the given serial number. Overrides ANDROID_SERIAL environment variable. -p - simple product name like 'sooner', or a relative/absolute path to a product out directory like 'out/target/product/sooner'. If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used, which must be an absolute path. devices - list all connected devices connect [: ] - connect to a device via TCP/IP Port 5555 is used by default if no port number is specified. disconnect [ [: ]] - disconnect from a TCP/IP device. Port 5555 is used by default if no port number is specified. Using this command with no additional arguments will disconnect from all connected TCP/IP devices.device commands: adb push - copy file/dir to device adb pull [ ] - copy file/dir from device adb sync [ ] - copy host->device only if changed (-l means list but don't copy) (see 'adb help all') adb shell - run remote shell interactively adb shell - run remote shell command adb emu - run emulator console command adb logcat [ ] - View device log adb forward - forward socket connections
问题得到解决。