Android Studio AVD not working despite having image on linux - android

I downloaded a nexus 4 x86-x64 image on my x64 ubuntu i5 laptop. Here are the error lines:
6:22:45 PM EmptyThrowable: /home/youssef/Android/Sdk/tools/mksdcard:
error while loading shared libraries: libgcc_s.so.1: cannot open
shared object file: No such file or directory
6:26:22 PM EmptyThrowable: /home/youssef/Android/Sdk/tools/mksdcard:
error while loading shared libraries: libgcc_s.so.1: cannot open
shared object file: No such file or directory

I had this error. I tried to find fix and found on askubuntu.com
apt-get install gcc-multilib
This fix solved this problem for me! Here it is!

Assuming you are using a Debian derivative
$ sudo apt-get install libgcc1:i386
to verify the libraries used by mksdcard
$ ldd /path/to/Android/Sdk/tools/mksdcard
linux-gate.so.1 => (0xf77e4000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf779c000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75ed000)
/lib/ld-linux.so.2 (0x56629000)

Related

ADT - libstdc++.so.6: cannot open shared object file

I have Fedora 20 64-bits, and I have a problem with Android Development Tools.
When I try to run project I have these errors:
[2014-05-11 22:08:03 - TestAp] /home/damian/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt:
error while loading shared libraries: libstdc++.so.6: cannot open
shared object file: No such file or directory
[2014-05-11 22:08:03 - appcompat_v7] /home/damian/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt:
error while loading shared libraries: libstdc++.so.6: cannot open
shared object file: No such file or directory
I know that my question is also writing here but the solutions is not working with Fedora 20.
I'm not totally sure about Fedora 20, but I had this same problem in Ubuntu 14.04 and installing these libraries fixed it.
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
See this post:
Android SDK - aapt error : libstdc++.so.6 cannot open shared object file
On installing NDK, on RedHat x64 these commands was helpful for me:
yum update
yum install libstdc++.i686
yum install compat-libstdc++-33.i686
Os:
[root#VM-Lin-CentOS ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)

Error while launching project in android

I am using Fedora 17 64 bit operation system. I got following error even after installing 32 bit shared library.
[2013-03-22 19:19:29 - adb] /usr/src/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2013-03-22 19:19:29 - adb] 'adb version' failed!
/usr/src/android-sdk-linux/platform-tools/adb:
error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2013-03-22 19:19:29 - adb] Failed to parse the output of 'adb version':
I had tried installing following library but it still didn't work
yum install ncurses-libs.i686
Loaded plugins: langpacks, presto, refresh-packagekit
No package ncurses-libs.i686 available.
Error: Nothing to do
Even After trying following command it didn't work.
yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
Loaded plugins: langpacks, presto, refresh-packagekit
updates/metalink | 3.6 kB 00:00
updates | 4.6 kB 00:00
updates/primary_db | 7.9 MB 00:24
No package ncurses-libs.i686 available.
Package libstdc++-4.7.2-2.fc17.i686 already installed and latest version
Package libgcc-4.7.2-2.fc17.i686 already installed and latest version
Nothing to do
If you are running a 64-bit distribution on your development machine, you need to install the ia32-libs package using apt-get::
apt-get install ia32-libs
For more information http://developer.android.com/sdk/installing/index.html.
try this command :
yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
This is happening because Android SDK is a 32bit application and require some 32bit shared libraries,
You can fixed with:
$ sudo apt-get install ia32-libs
See here : Android SDK — Linux
I am on centos and following dependencies will resolve android build issue
yum install ncurses-libs.i686 libstdc++48.i686 libgcc.i686 zlib.i686

Ubuntu 64 with Android 64 Bundle cannot find adb executable

I'm experiencing the following problem when trying to run adb on Ubuntu 12.10, x86_64:
[2013-02-19 20:56:04 - adb] Unexpected exception 'Cannot run program
"/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2,
No such file or directory' while attempting to get adb version from
'/home/user/adt-bundle-linux-x86_64/sdk/platform-tools/adb'
I located adb, tried chmod +x adb and it just doesn't work. I also tried chmod +x platform-tools/
and chmod +x tools/. After that I tried ./adb
I've Googgled for the problem. They were talking about ia32 package. Ubuntu can't locate that package nor the ia32 multi arch whatever.
System is Ubuntu 12.10 64 and I downloaded adt-bundle-linux-x86_64.zip package and just unzip it.
What am I doing wrong ? Thank you!
On Debian 7 I bumped in the same issue.
Diagnosis:
edb#lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
not a dynamic executable
edb#lapelidb:~/today$ file /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
/opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
Solution: Adding support for 32-bit support and the required 32-bit libraries:
edb#lapelidb:~/today$ sudo dpkg --add-architecture i386
edb#lapelidb:~/today$ sudo apt-get update
edb#lapelidb:~/today$ sudo apt-get install libc6:i386 libstdc++6:i386
Et voila:
edb#lapelidb:~/today$ ldd /opt/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
linux-gate.so.1 => (0xf772a000)
librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf770a000)
libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7706000)
libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf76ec000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7600000)
libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf75da000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf75bd000)
libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf745a000)
/lib/ld-linux.so.2 (0xf772b000)
I'm using Ubuntu 12.04 LTS version. I've tried the steps suggested by 'amo-ej1', but my 'dpkg' didn't have 'add' or 'architecture' options.
However, the following worked 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
IMPORTANT EDIT (ALTERNATE SOLUTION):
Although the above would resolve your error (and you can proceed with the Android App tutorial), as I found, ADT will also need 'aapt' (another 32-bit binary) located in:
<path-to-your-adt-sdk-package>/sdk/build-tools/android-x.x/
And unfortunately, the link that I provided above doesn't provide this binary.
So, here's my other solution:
1) Update your system
Open 'Update Manager' => 'Settings' => 'Updates
Check "Recommended Updates (precise updates)"
Update the updates that are being shown
2) Install ia32-libs
sudo apt-get install ia32-libs
And I finally was able to install 'ia32-libs'. To know why 'ia32-libs' wouldn't install in the first place, please read the answer posted by 'slangasek' here:
https://askubuntu.com/questions/136394/cannot-install-ia32-libs
On Ubuntu 12.10 x86_64 the package to run 32bits are ia32-libs and ia32-libs-multiarch.
If you type
file adb
You'll see that adb is a 32 bit file on a 64 bit system. You need the ia32 packages to emulate and run this file. But you can't!
The problem right now is you cannot download these packages, they're trying to convert it to something I guess x86_64. Here you can read about convert in the package NEWS:
summary of the conversion:
"ia32-libs (20090808ubuntu27) precise; urgency=low
ia32-libs is now a transitional package depending on
ia32-libs-multiarch,
the i386-only package which depends on all the 32-bit library packages
previously included in ia32-libs itself. As a result, ia32-libs will be
uninstallable for some time during the precise cycle, while the dependent
libraries are updated to be coinstallable using multiarch. Developers
are encouraged to help with the conversion process for these libraries,
described at:
http://wiki.debian.org/Multiarch/Implementation
-- Steve Langasek "
So if you try to edit your source.list file to grab it from older repo you'll break packages. So ubuntu 12.10 people have to wait or adb is compile or whatever to 64 bit.
edit:
Debian 7.0 will support multiarch where x64 version can run x32 binary.
source: http://www.debian.org/News/2013/20130504
I use debian_x64
add i386 lib
dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
ldd /home/yourname/adt-bundle-linux-x86_64-20130729/sdk/platform-tools/adb
when you found “android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory”
you can try
sudo apt-get install ia32-libs
sudou apt-get install zlib.i686
restart your computer
and try again
unzip that file with this:
sudo tar xvfz adt-bundle-linux-x86.zip -C /opt/android
than run that code:
sudo chown -R your_user_name /opt/android
i think it will work

error compiling Android on ubuntu 11.10

I am getting following error while compiling Android on ubuntu 11.10
target arm C: libc <= bionic/libc/bionic/pthread.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o] Error 1
Any Clue?
It can't find cc1. On my fresh install of Ubuntu 11.10 it's installed but not in my path. Try adding it manually to your path.
export PATH=<pathtoitgoeshere>:$PATH
On my Ubuntu, it was found at
/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1
But you can find it for yours by using
gcc -print-prog-name=cc1
I have spent about a day to find root cause of this: arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file... and others issues. The issue was that I unpacked NDK and SDK with 7z which removed executable permission for all binaries and Eclipse was not able to start cc1. Once I unpacked tar files of SDK and NDK using tar, everything started working well.
PS. I hope it will safe a day for others.
I encountered this problem after upgrading from Ubuntu 12.04 => 14.04.
Seems like the build-essential package wasn't upgraded properly. For me, I was able to fix by doing
sudo apt-get purge gcc
sudo apt-get install gcc

Eclipse Android Plugin -- libncurses.so.5

I am struggling mightily with installing ADT (Android Dev Tools) on Eclipse in Fedora 16 OS, 64-bit.
Eclipse itself is running fine.
As instructed, I first installed the regular Android SDK, the OS-level toolkit. That went smoothly and I was able to use the Android app within the tools dir.
In Eclipse, it was a little more difficult because I first had to install GWT or google-related tools, which required a core Eclipse Indigo update of WST. Finally, the ADT install reported success.
However, every time when opening Eclipse, it gives me a multitude of popups regarding libncurses.so.5 and the following log:
[2012-04-04 02:06:35 - adb] /opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-04-04 02:06:35 - adb] 'adb version' failed!
/opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-04-04 02:06:35 - adb] Failed to parse the output of 'adb version':
Standard Output was:
Error Output was:
/opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-04-04 02:06:35 - adb] /opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-04-04 02:06:35 - adb] 'adb version' failed!
/opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-04-04 02:06:35 - adb] Failed to parse the output of 'adb version':
Standard Output was:
Error Output was:
/opt/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
When I do try to open Android SDK Manager (under Window), the plugin does open but the window has no close button anywhere (unlike the same one at the OS-level, which also looks the same) so the only way to get out of it is to find the Eclipse PID and kill it.
This solved the problem entirely:
yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
This is happening because Android SDK is a 32bit application and require some 32bit shared libraries,
I had same issue on Ubuntu 64 bits, and fixed with:
$ sudo apt-get install ia32-libs
Install just libncurses5:
$ sudo apt-get install libncurses5:i386
ia32-libs will install much unnecessary libs.
yaourt -S multilib/lib32-ncurses
for ArchLinux
You probably don't have libncurses5 installed.
Try
rpm --install ncurses-libs
had similar issue on centos:
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
did the following:
yum install ncurses ncurses-devel ncurses-libs ncurses-libs.i686 ncurses-devel.i686
And the issue fixed.
This tip from Tim Mattison's blog did it for me under Debian Wheezy:
sudo apt-get install lib32ncurses5 lib32stdc++6

Categories

Resources