debian7 64bit搭建android開發環境ADT Bundle

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章