Error message when setting up ADT in Linux

2019-03-29 10:24发布

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?

标签: linux adb
6条回答
干净又极端
2楼-- · 2019-03-29 10:47

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.

查看更多
爷、活的狠高调
3楼-- · 2019-03-29 11:00

The command to install IA32 libraries on Ubuntu is:

apt-get install ia32-libs
查看更多
女痞
4楼-- · 2019-03-29 11:00

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.

查看更多
forever°为你锁心
5楼-- · 2019-03-29 11:00

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

查看更多
家丑人穷心不美
6楼-- · 2019-03-29 11:07

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.

查看更多
混吃等死
7楼-- · 2019-03-29 11:11
sudo dpkg --add-architecture i386
sudo apt-get update
apt-get install ia32-libs
查看更多
登录 后发表回答