Error message when setting up ADT in Linux

核能气质少年 提交于 2020-01-01 05:29:23

问题


I installed Ubuntu 11.10, installed GNOME 3 (replaced Unity), installed Eclipse from the Ubuntu Software Center, installed the android sdk and ADT.

Now when I start eclipse I get a message saying:

Failed to get ADB version : Cannot run program 
/home/ayush/android-sdk/platform-tools/adb":java.io.IOException:error=2,
No such file or directory

What is causing this error and how do I fix it?


回答1:


The command to install IA32 libraries on Ubuntu is:

apt-get install ia32-libs



回答2:


sudo dpkg --add-architecture i386
sudo apt-get update
apt-get install ia32-libs



回答3:


Before that please check your ubuntu version. if you are running with 64 bits, you need to install a linux emulator, IA32 bit I thinks. Verify on Google.

after that, your ADB can run easily on ubuntu.




回答4:


I'm using Fedora 17 and I got the same error as the poster:

[2013-08-29 21:44:08 - adb] Unexpected exception 'Cannot run program 
"/home/el/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb": 
error=2, No such file or directory' while attempting to get adb version from 
'/home/el/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb'

I know this works if you are using Fedora 17/18 (login as root)

yum install redhat-lsb.i686

And then restart the IDE and the errors no longer show.




回答5:


I had the exact same error as you had, but on my Ubuntu 12.04 LTS version.

The following avoided that error for me:

1) Install 'adb' and 'fastboot' provided by the following third-party PPA.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

2) Replace the copy of 'adb' and 'fastboot' provided by the official Android SDK with those installed from the above step:

cp /usr/bin/adb <path-to-your-adt-sdk-package>/sdk/platform-tools/adb
cp /usr/bin/fastboot <path-to-your-adt-sdk-package>/sdk/platform-tools/fastboot

3) Restart(re-execute) your eclipse binary.

Full credits:

http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html

They have the binaries for 12.10, 11.10 and 11.04 as well.




回答6:


Don't try to install ia32-libs, this library has been obsoleted. So, you should install these libraries:

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5

Cheers



来源:https://stackoverflow.com/questions/9996167/error-message-when-setting-up-adt-in-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!