debian7 64bit搭建android开发环境ADT Bundle

来源:互联网 发布:视频同步播放 算法 编辑:程序博客网 时间:2024/05/21 10:08

http://www.openswc.com/forum.php?mod=viewthread&tid=643

问题解决
问题1
unexpected exception Cannot run program "/home/..../androiddev/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/adb": java.io.IOException: error=2, No such file or directory while attempting to get the adb version: /home/..../androiddev/adt-bundle-linux-x86_64-20130522/sdk/platform-tools/adb
原因
# file adb
adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
可以看到adb是一个32位的linux程序,Android SDK是32位的,如LINUX是64位的,一般会提示出错.
解决办法
安装32位库
dpkg --add-architecture i386
apt-get update
sudo apt-get install ia32-libs ia32-libs-gtk
或者在debian 添加删除软件 中心  搜索 ia32-libs安装;
如果不dpkg --add-architecture i386开启混合架构和apt-get update,会提示以下错误:
# sudo apt-get install ia32-libs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:
下列软件包有未满足的依赖关系:
ia32-libs : 依赖: ia32-libs-i386 但无法安装它
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。
相关debian packages
http://packages.debian.org/source/wheezy/ia32-libs
http://packages.debian.org/wheezy/ia32-libs-i386


问题2
/adt-bundle-linux-x86_64-20130522/sdk/platform-tools# ./adb 
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
解决办法:
在debian 添加删除软件 中心  搜索libncurses,然后安装64bit版本libncurses5-5.9-10(64位)安装成功后,adb正常工作
或者sudo apt-get install lib64ncurses5


/adt-bundle-linux-x86_64-20130522/sdk/platform-tools# ./adb devices
* daemon not r
unning. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
0123456789ABCDEF        device
相关debian packages
http://packages.debian.org/source/wheezy/ncurses
http://packages.debian.org/wheezy/lib64ncurses5
http://packages.debian.org/wheezy/lib32ncurses5

原创粉丝点击