So I get the following error when creating a new project on Android Studio 0.5.2 on Ubuntu 13.04 64-bit and trying to run it on a physical device:
Information:/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: Failed to run command:
/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt s -i
/home/juan/AndroidStudioProjects/MyApplication4/app/build/exploded-aar/com.android.support/appcompat-v7/19.0.1/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png -o /home/juan/AndroidStudioProjects/MyApplication4/app/build/res/all/debug/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png
Error Code:
127
Output:
/home/juan/Documents/android-studio/sdk/build-tools/android-4.4.2/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
I've got the same setup (AS 0.5.2) on a MacBook Pro and Gradle completes successfully with no errors at all, so something must be wrong. I also had to install 32-bit versions of a couple libraries to get adb working on my 64-bit Ubuntu. Maybe that's whats going on here? Any help would be appreciated.
EDIT Also tried installing the following libraries:
$sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
No luck.
fixed it by reinstalling
sudo apt-get install lib32z1 lib32z1-dev
Thanks anyway!
I have a 64 bit Ubuntu, and I resolved the problem by installing
the following packages
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
http://developer.android.com/sdk/installing/index.html
Related
I just installed android studio on linux , configured the SDK and installed the building tools now when I try to sync with gradle or (build the app) it fails and throws this error :
Error:Execution failed for task ':app:mergeDebugResources'.
/home/user_name/AndroidStudioProjects/project_name/app/src/main/res/drawable-hdpi/ic_launcher.png: Error: Cannot run program "/home/user_name/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory
Error:Error: Cannot run program "/home/user_name/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory
/home/user_name/AndroidStudioProjects/project_name/app/src/main/res/drawable-hdpi/ic_launcher.png
I tried to change the ' buildToolsVersion ' in my gradle file and it gave me the same error for 21.1.2 , 1 , 0 also.
I solved the problem by running those commands
$ sudo apt-get install lib32stdc++6
$ sudo apt-get install lib32z1
Ubuntu can't run the aapt on 64 bit before installing this packages
EDIT 19-04-2016 :
Android Studio 2 have the installation guide updated with those packages and bunch more to compile on 64-bit machines correctly
$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
I had the same issue even after trying out the accepted solution. In my case the gradle build tool version that I've specified was not installed on my debian system. It worked like a charm after I changed the buildToolVersion to the installed version which was (23.0.2)
I was creating a new project out of nothing, for testing purpose, leaving all parameter to default (I didn't made any code change), on a new ADT installation (Ubuntu Gnome 14.04 LTS, x86_64 CPU), but I have the following error in the Eclipse Console :
[2014-06-11 09:03:10 - Kronos] /home/erwan/Applications/ADT/adt-bundle-linux-x86_64-20140321/sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Here is what I already tried:
-> I tried to (re)install ia32-libs, libstdc++ and libstdc++6 via Ubuntu software repository : No change
-> Checked for update (for Eclipse and the SDK) : No change
-> Reinstalled All Android Build tools : No change
-> Reinstalling ADB : No change
sudo apt-get install lib32stdc++6 lib32z1
On my 64-bit Ubuntu 14.04 desktop, this was all I needed:
sudo apt-get install lib32stdc++6
I too have a 64-bit Ubuntu 14.04 desktop, and the correct answer for that setup is indeed:
sudo apt-get install lib32stdc++6
In my Ubuntu 16.04 , I am not able to install "All" the libs ( sudo apt-get install lib32stdc++6 ) with message saying:
$ sudo apt-get install libgl1-mesa-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgl1-mesa-dev:i386 : Depends: libgl1-mesa-glx:i386 (= 11.2.0-1ubuntu2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
After some digging, I found I was using the aapt with SDK 19. (
android-sdk-linux/build-tools/19.x.y/aapt )
switch the appt from sdk 19 to sdk 24 worked for me.
by editing the corresponding gradle file, change the buildToolsVersion from 19 to 24.0.1:
android {
buildToolsVersion "24.0.1"
}
i'm using ubuntu 15.04 version.I had the same problem.
I had already installed ia32-libs package(which has now changed to lib32z1 lib32ncurses5 package)
when i tried using command
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
i got a list of lib32stdc++6 packages which might solve the problem but this command wasn't able to correct the problem.
so i just installed lib32stdc++6 package by using command
sudo apt-get install lib32stdc++6
this worked perfectly for me
I seem to be having difficulties switching to Android Studio. I created a new Project in Android Studio 0.4.3 on Ubuntu 13.10. but I have been plagued with issues. I originally had issues on a windows box when it was first distributed which is why i ignored it until recently. I fixed a few things with gradle but seem to still be having other issues and I ended up following a few suggestions from the links bellow though nothing helped. Does anyone have any suggestions.
mergedebugresources-exception
installing android studio in ubuntu
How to Install Android studio in ubuntu 13.10
I've also installed fastboot and adb in terminal and I have also arbitrarily uninstalled whatever jdk I was using prior had and re-installed java 7 instead of 8 (since it would not install for some reason) via
sudo apt-get purge openjdk*
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /var/lib/dpkg/info/oracle-java8-installer*
sudo apt-get purge oracle-java8-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
bellow is the error message i am currently receiving
Execution failed for task ':helloandroid:mergeDebugResources'.
Error: Failed to run command:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt s -i /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png -o /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/res/all/debug/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png
Error Code:
127
Output:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Use lib32z1 - worked for me.
sudo apt-get install lib32z1
I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb.
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb
./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64
That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.
jason#ubuntu:~/usr/android-sdk-linux_x86$ echo $MACHTYPE
x86_64-pc-linux-gnu
Are you sure you followed this guide completely? Do you have ia32-libs installed?
Try this:
sudo apt-get install ia32-libs
I'm on Ubuntu 13.10 64 bit and the above solutions don't quite work (I'm also using Andriod Studio but that shouldn't matter). I guess the issue is that Google's ADK binary is a 32 bit application. This worked for me:
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
apt-get install lib32ncurses5 lib32stdc++6
It depends on the Ubuntu version you running
If you running Ubuntu < 12.04 then run: sudo apt-get install ia32-libs
(ia32-libs was deprecated in 12.04)
If you running Ubuntu >= 12.04 then run: apt-get install lib32ncurses5 lib32stdc++6
To check your ubuntu version click on the cog icon in the top right corner and click "About this computer"
When i try to create a new Android Virtual Device(AVD) on Ubuntu 11.04, i get this error:
"Error while loading shared libraries: libstdc++.so.6: cannot open shared object file: no such file or directory. Yes, the library file is in its right place /usr/lib :\
I ran into this problem using Ubuntu 11.04 x64, the error was fixed by installing lib32stdc++6, ia32-libs, and lib32ncursesw5
Do
yum install ncurses-libs.i686 libstdc++.i686 glibc.i686
and then try again.
It's a 64 bit install I'm guessing.
In Ubuntu 13.10, the ia32-libs package is no more present. Execute the following commands:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
sudo apt-get install libgl1-mesa-dri:i386
The second shall install all its dependencies and resolve the compiling problems. The dependencies are:
gcc-4.8-base:i386 libc6:i386 libdrm-intel1:i386 libdrm-nouveau2:i386
libdrm-radeon1:i386 libdrm2:i386 libelf1:i386 libexpat1:i386 libffi6:i386
libgcc1:i386 libglapi-mesa:i386 libllvm3.3:i386 libpciaccess0:i386
libstdc++6:i386 libtxc-dxtn-s2tc0:i386 zlib1g:i386