Ubuntu下Android SDK中adbs问题的解决方案
2015-03-06 11:00
218 查看
在Linux平台下配置Android SDK开发环境过程中,Eclipse会提示错误如下:
Unexpected exception 'Cannot run program "/home/ubuntu/adt/sdk/platform-tools/adb":error=2 No such file or directory' while attempting to get adb version from /home/ubuntu/adt/sdk/platform-tools/adb
遇到上述问题出现的原因是:
在64bit的系统环境下,Android sdk只有32bit的程序,需要安装ia32-libs兼容库,才能正常使用。
通常的建议是运行以下命令:
sudo apt-get install ia32-libs
但是一般情况下会出现以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: Package 'ia32-libs' has no installation candidate
根据上面的提示运行以下命令:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
再次打开eclipse上述问题就会消失。但接着又出现一个新的问题,大致如下:
./emulator: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
问题原因同上,缺少 lib32stdc++6这个包,使用 apt-get install 命令安装一下就应该可以了。
麻烦接踵而至,因为缺少gcc的依赖包,这简直是个掉进坑里了。可以一步一步按照提示安装各种依赖包,知道问题解决。这里提供一个快速的解决方案:
按照http://jingyan.baidu.com/article/851fbc37fe45773e1f15abe0.html中的方法将ubuntu中软件更新源改为http://ftp.sjtu.edu.cn/ubuntu,这是上海交大的一个映像地址。然后在设置中心对系统进行更新。再次运行 sudo apt-get install lib32stdc++6 即可。
到这里eclipse中新建的android程序就可以正常运行,好艰难的hello android。
Unexpected exception 'Cannot run program "/home/ubuntu/adt/sdk/platform-tools/adb":error=2 No such file or directory' while attempting to get adb version from /home/ubuntu/adt/sdk/platform-tools/adb
遇到上述问题出现的原因是:
在64bit的系统环境下,Android sdk只有32bit的程序,需要安装ia32-libs兼容库,才能正常使用。
通常的建议是运行以下命令:
sudo apt-get install ia32-libs
但是一般情况下会出现以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: Package 'ia32-libs' has no installation candidate
根据上面的提示运行以下命令:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
再次打开eclipse上述问题就会消失。但接着又出现一个新的问题,大致如下:
./emulator: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
问题原因同上,缺少 lib32stdc++6这个包,使用 apt-get install 命令安装一下就应该可以了。
麻烦接踵而至,因为缺少gcc的依赖包,这简直是个掉进坑里了。可以一步一步按照提示安装各种依赖包,知道问题解决。这里提供一个快速的解决方案:
按照http://jingyan.baidu.com/article/851fbc37fe45773e1f15abe0.html中的方法将ubuntu中软件更新源改为http://ftp.sjtu.edu.cn/ubuntu,这是上海交大的一个映像地址。然后在设置中心对系统进行更新。再次运行 sudo apt-get install lib32stdc++6 即可。
到这里eclipse中新建的android程序就可以正常运行,好艰难的hello android。
相关文章推荐
- Ubuntu中的Load/Unload Cycle Count问题及解决方案[转]
- ubuntu的两个基础问题解决方案
- Android --- Ubuntu 下安装ADT ,少WST插件问题,解决方案
- 关于ubuntu配置java环境的若干问题和解决方案
- 安装WPS for Linux Alpha 6后Ubuntu字体渲染出现问题的解决方案
- Ubuntu 常见问题及解决方案
- ubuntu下乱码问题解决方案
- Ubuntu 下Evolution不能清空回收站的问题解决方案
- 编译android sdk源码时遇到的问题汇总及能找到的解决方案
- Ubuntu 12.04 中java swing上乱码问题解决方案
- Ubuntu 8.10使用过程中遇到的问题及解决方案
- ubuntu 9.10安装PDF打印机后出现两个问题及解决方案
- 关于ubuntu10.04触摸板不能禁用和gedit文本编辑器中文乱码问题的一个解决方案
- Ubuntu 11.04 安装 ns2-allinone-2.34【完整版】(附各种问题解决方案)
- ubuntu 10.04死机后root根分区无法挂载,无法启动的问题解决方案
- Ubuntu中的Load/Unload Cycle Count问题及解决方案(8.04前)
- maemo环境安装问题和解决方案(ubuntu 10.04)
- 关于ubuntu10.04触摸板不能禁用和gedit文本编辑器中文乱码问题的一个解决方案
- Ubuntu下Mysql中文乱码问题解决方案
- ubuntu下乱码问题解决方案