当前位置: 首页>>技术教程>>正文


Android SDK 与 ADB 有问题

, , ,

问题描述

因此,我安装了 Android SDK、Eclipse 和 ADT。在设置 ADT 后第一次启动 Eclipse 时,弹出此错误:

[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:

Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:

Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

我不太确定这是怎么回事。感觉很奇怪那里缺少一个 Library 。我正在使用 Ubuntu 12.04。作为 Android 开发人员,没有 adb 是一个相当大的打击。我该如何解决?

最佳回答

您需要在系统中安装库 ncurses 32 位版本

sudo apt-get install libncurses5:i386

除了 libncurses5,您可能还需要 libstdc++6。

sudo apt-get install libstdc++6:i386

用命令

sudo apt-get install ia32-libs

您安装了很多对解决问题无用的库。

次佳回答

Android SDK 平台工具需要 ia32-libs ,它本身就是一大包库:

sudo apt-get install ia32-libs

更新:

以下是关于如何安装 Android SDK 库依赖项的 latest instructions from Google

If you are running a 64-bit distribution on your development machine, you need to install additional packages first. For Ubuntu 13.10 (Saucy Salamander) and above, install the libncurses5:i386, libstdc++6:i386, and zlib1g:i386 packages using apt-get:

sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386 

For earlier versions of Ubuntu, install the ia32-libs package using apt-get:

apt-get install ia32-libs 

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/12734.html,未经允许,请勿转载。