Ubuntu 下的 adb 问题
我是 Linux 新手,正在尝试设置我的机器进行 Android 开发。我安装了 SDK,并通过更改 ~/.bashrc 并添加以下内容来设置路径中的“platform-tools”路径:
export PATH=$PATH:/home/user/sdk/platform-tools
当我在命令行中键入:时
echo $PATH
,它将目录返回到我的 sdk 平台-工具。
现在,当我输入:
adb devices
命令行显示“adb 命令未找到”。
如果有人可以帮助我,我将不胜感激。谢谢!
〜Nemisis7654
I am new to Linux and am attempting to set up my machine for Android development. I installed the SDK, and I set up the path to the "platform-tools" in my path by altering ~/.bashrc and adding the following:
export PATH=$PATH:/home/user/sdk/platform-tools
When I type:
echo $PATH
into the command line, it spits back the directory to my sdk platform-tools.
Now, when I type:
adb devices
The command line says "adb command not found".
If anyone could help me out, it would be greatly appreciated. Thanks!
~Nemisis7654
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在这里找到了对我有用的解决方案(Ubuntu 11.10 x64)
http://kenno.wordpress.com/2011/10/27/ubuntu-11-10-32-bit-applications-do-not-run-64- bit/
基本上,即使我安装了工具,我也只需要重新安装 libc6-i386,它最终找到了 adb。
The solution that worked for me was found here (Ubuntu 11.10 x64)
http://kenno.wordpress.com/2011/10/27/ubuntu-11-10-32-bit-applications-do-not-run-64-bit/
and basically even though I had the tools installed I just needed to do a reinstall of the libc6-i386 and it finally found adb.
看起来您已经完成了第一步,现在您只需添加特定设备的 udev 值即可。请参阅此处的步骤 3。如果您使用的是模拟器而不是设备,则 adb 应该可以正常工作,而无需执行此步骤。您提到了您所做的事情,但没有提到问题是什么,所以我认为这就是您遇到的问题。当您在终端中输入
adb
时会发生什么?Looks like you got the first step down, now you just need to add the udev values for your particular device. See step 3 here. If you are using an emulator rather than a device adb should work fine without this step with what you have. You have mentioned what you have done but not what the problem is so I assume this is the issue you are having. What happens when you type
adb
into the terminal?使用最新的 android SDK,adb 应该位于 platform-tools 下。
就放
导出 ANDROID=/usr/local/android/android-sdk-linux_x86
导出 PATH=${PATH}:${ANDROID}/tools:${ANDROID}/platform-tools
并检查文件权限(也适用于 Android 或其他二进制文件)。
With the latest android SDK, adb should be under platform-tools.
Just put
export ANDROID=/usr/local/android/android-sdk-linux_x86
export PATH=${PATH}:${ANDROID}/tools:${ANDROID}/platform-tools
and check the file permissions (for android or other binaries too).
在旧版本的 sdk 中,adb 位于 /sdk/tools 目录中。您可能需要为 adb 创建从 platform-tools 到该目录的符号链接:
In older versions of the sdk, adb was located in the /sdk/tools directory. You may need to create a symbolic link from platform-tools into that directory for adb: