adb devices 命令没有显示任何内容

发布于 2024-12-18 03:37:17 字数 1170 浏览 1 评论 0原文

目前我正忙于Android SDK。我让它工作了,但是当我进入 $sudo adb shell 时。它给出了sudo:adb:找不到命令。对于这个问题,我检查了此链接: adb devices 命令不起作用 但是如果我输入 $现在 sudo adb devices 。注意到发生了。

甚至 *daemon 也没有运行。现在启动它的端口 5037 * 和其余的。但它看起来像这样:

    michiel@ubuntu: ~$ sudo adb devices
    michiel@ubuntu: ~$

所以我可以输入下一个命令。有人知道如何解决这个问题吗?与 $sudo adb shell 相同。什么也没有出现。

当我在没有 sudo 的情况下输入 adb devices 时。我收到错误:

-bash: /usr/local/sbin/adb: No such file or directory. 

但它就在那里!

echo $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/michiel/jdk1.6.0_29/bin:home/michiel/android-sdk-linux/tools:/home/michiel/android-sdk-linux/platform-tools

编辑

当我现在启动 Eclipse 时,出现下一个错误: Failed to get the adb version: Cannot run program"/home/michiel/android-sdk-linux/platform-tools/adb":java.io.IOException :error=2,没有这样的文件或目录。

已解决

上周末我安装了 Ubuntu 的全新安装。我下载了 ia32.lib 和 openjdk 而不是 java jdk 并手动安装。经过一番努力,我成功连接了设备,现在我可以看到它了。感谢您的帮助:)

At the moment I'm busy with the Android SDK. I got it working, but when I entered $sudo adb shell. It gave sudo: adb: command not found. For this problem I checked this link: adb devices command not working But if I enter $sudo adb devices now. Noting happens.

Not even *daemon not running. starting it now op port 5037 * and the rest. But it looks like this:

    michiel@ubuntu: ~$ sudo adb devices
    michiel@ubuntu: ~$

So I can enter the next command. Someone knows how to fix that? It's the same with $sudo adb shell. Nothings comes up.

When I enter adb devices without the sudo. I get the error:

-bash: /usr/local/sbin/adb: No such file or directory. 

But it's there!

echo $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/michiel/jdk1.6.0_29/bin:home/michiel/android-sdk-linux/tools:/home/michiel/android-sdk-linux/platform-tools

Edit

When I start Eclipse now, I get the next error: Failed to get the adb version: Cannot run program"/home/michiel/android-sdk-linux/platform-tools/adb":java.io.IOException:error=2, No such file or directory.

SOLVED

Last weekend I installed a clean install of Ubuntu. I downloaded the ia32.lib and openjdk instead of java jdk and install is manually. After some struggling I managed to connect the device and now I can see it. Thx for the help :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

我为君王 2024-12-25 03:37:17

我前两天也遇到了这个问题,我搜索了又搜索,发现我的ubuntu是64位的,而adb与ubuntu 64位不匹配,所以我在终端中使用了以下命令:

sudo apt-get update
sudo apt-get install ia32-libs

我的问题解决了
不要忘记,您应该导出您的 java-version-sdk。

I also had this problem two days ago and I searched and searched so I found that my ubuntu is 64-bit and adb is not match to ubuntu 64-bit so I used the below command in terminal:

sudo apt-get update
sudo apt-get install ia32-libs

and my problem was solved
don't forget, you should export your java-version-sdk.

放血 2024-12-25 03:37:17

尝试在 .bashrc 文件末尾添加以下内容(可以在主目录中找到):

export PATH=:/home/michiel/android-sdk-linux/platform-tools:$PATH 

现在使用不带 sudo 的 adb 命令。这为我解决了问题。

哈!

Try adding the following at the end of your .bashrc file (can found in your home directory):

export PATH=:/home/michiel/android-sdk-linux/platform-tools:$PATH 

Now use the adb command without sudo. This solved the problem for me.

HTH!

作死小能手 2024-12-25 03:37:17

尝试杀死&启动adb服务器
cmd

adb Kill-server

adb start-server

try to kill & start the adb server
cmd

adb kill-server

adb start-server

梦过后 2024-12-25 03:37:17

我认为您正在 Linux 平台上运行,因此运行的二进制文件后面将跟着 .

try with sudo .adb devices
    or try with sudo .adb shell

I think you are running on the linux platform so for that running binary will be followed by .

try with sudo .adb devices
    or try with sudo .adb shell
云巢 2024-12-25 03:37:17

检查 adb 在您的 android sdk 中是否可用 -->平台工具。如果它
可用 请按照下列步骤操作:

设置 Android 变量

首先进入您的家并按Ctrl + H它将显示您隐藏
文件现在查找 .bashrc 文件,然后使用任何文本编辑器打开它
将以下行放在文件末尾:

导出 ANDROID_HOME=/myPathSdk/android-sdk-linux 导出
PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

现在重新启动系统

它有效!

Check adb is available in your android sdk --> platform-tools. If it
available 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文