展会信息港展会大全

Android出现错误 adb: command not found
来源:互联网   发布日期:2016-01-14 12:45:17   浏览:5673次  

导读:新安装Ubuntu ,第一次安装android SDK,输入命令后出现not found.~$ adbNo command #39;adb#39; found, did you mean: Command #39;cdb#39; from package #39;tinycdb#39; (main) Command......

新安装Ubuntu ,第一次安装android SDK,输入命令后出现not found.

~$ adb

No 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-linux

export 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 <serial number>- directs command to the USB device or emulator with

the given serial number. Overrides ANDROID_SERIAL

environment variable.

-p <product name or path>- 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 <host>[:<port>]- connect to a device via TCP/IP

Port 5555 is used by default if no port number is specified.

disconnect [<host>[:<port>]]- 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 <local> <remote>- copy file/dir to device

adb pull <remote> [<local>]- copy file/dir from device

adb sync [ <directory> ]- 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 <command>- run remote shell command

adb emu <command>- run emulator console command

adb logcat [ <filter-spec> ] - View device log

adb forward <local> <remote> - forward socket connections

问题得到解决。

赞助本站

人工智能实验室

相关热词: 错误 command not found

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港