Linux Ubuntu 11.04 上的 Android/Eclipse 安装 - aapt 和 adb 无法正常工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7056914/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android/Eclipse Installation on Ubuntu 11.04 - aapt and adb not working properly
提问by jcampos8782
I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb.
我是一名 Linux n00b,试图在 Eclipse 中设置我的开发环境。我安装了 Eclipse 和 Android SDK,但是在启动 Eclipse 或尝试运行 ./aapt 或 ./adb 时出现一些错误。
jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
jason@ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb
./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64
That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.
ELF 类错误让我觉得我安装了错误版本的软件,但我不记得被要求在 x86 和 x86-64 之间进行选择。
jason@ubuntu:~/usr/android-sdk-linux_x86$ echo $MACHTYPE
x86_64-pc-linux-gnu
采纳答案by Lopa
回答by Fernando Almeida
apt-get install lib32ncurses5 lib32stdc++6
回答by Guy Sirton
I'm on Ubuntu 13.10 64 bit and the above solutions don't quite work (I'm also using Andriod Studio but that shouldn't matter). I guess the issue is that Google's ADK binary is a 32 bit application. This worked for me:
我使用的是 Ubuntu 13.10 64 位,上述解决方案不太有效(我也在使用 Andriod Studio,但这应该无关紧要)。我想问题在于 Google 的 ADK 二进制文件是一个 32 位应用程序。这对我有用:
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
回答by Steven Mark Ford
It depends on the Ubuntu version you running
这取决于您运行的 Ubuntu 版本
If you running Ubuntu < 12.04 then run: sudo apt-get install ia32-libs
(ia32-libs was deprecated in 12.04)
如果您运行 Ubuntu < 12.04,则运行:sudo apt-get install ia32-libs
(ia32-libs 在 12.04 中已弃用)
If you running Ubuntu >= 12.04 then run: apt-get install lib32ncurses5 lib32stdc++6
如果您运行 Ubuntu >= 12.04 然后运行: apt-get install lib32ncurses5 lib32stdc++6
To check your ubuntu version click on the cog icon in the top right corner and click "About this computer"
要检查您的 ubuntu 版本,请单击右上角的齿轮图标,然后单击“关于此计算机”