126

I have a little problem.

The Problem:
I am trying to build a gradle of my Android Project on Jenkins and now I am standing on this problem i can't resolve. During the Building I have this Error message:

:Client:mergeDebugResources
/var/lib/jenkins/workspace/LMA-Client/Client/build/exploded-aar/com.google.android.gms/play-services/3.1.59/res/drawable-hdpi/common_signin_btn_text_focus_light.9.png: 
Error: Cannot run program "/opt/android-sdk/build-tools/19.0.1/aapt": java.io.IOException: error=2, No such file or directory
:Client:mergeDebugResources FAILED

You can imagine that this aapt... yep its there and the png... its there too, so the mistake must be somewhere else.

The Solution?
Now I googled 1-2 hours around, surfed on this great Website and what I found is that if Jenkins runs on a 64-bit system, I need to install the ia32-libs. Like that:

sudo apt-get install ia32-libs

now I tried that, and I couldn't install it:

The following packages have unmet dependencies:
 ia32-libs : Depends: ia32-libs-multiarch

so I tried to install "ia32-libs-multiarch", but again:

The following packages have unmet dependencies:
 ia32-libs-multiarch:i386 : Depends: libgphoto2-2:i386 but it is not going to be installed
                            Depends: libsane:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Finally
so finally im standing here and asking me: is that really the solution? And why should I install this thing? And how? So please help me, I think I am not far away from the answer.

2

4 Answers 4

335

I had the following similar error on Ubuntu 13.10:

Cannot run program "/usr/local/android-sdk-linux/build-tools/19.0.3/aapt": error=2, No such file or directory

And this answer fixed it for me:

To get aapt working (this fixed my issues with the avd as well) just install these two packages:

sudo apt-get install lib32stdc++6 lib32z1
11
  • 23
    That fixed the problem for me in Ubuntu 14.04 Apr 25, 2014 at 5:00
  • 2
    That fixed it for me in Ubuntu 14.04 as well.
    – MinceMan
    Jun 10, 2014 at 15:09
  • 1
    building chrome on Ubuntu 14.04 and this helped get me by the same error I was having with aapt. Note ldd aapt now works, and shows dependencies. Previously it stated that the program wasn't a dynamic executable "not a dynamic executable". Now on to the next problem!
    – guyland123
    Aug 19, 2014 at 15:07
  • Amen! also fix node exec aapt issues
    – CesarTrigo
    Sep 17, 2014 at 22:54
  • Fixed my issue as well on Ubuntu 14.04, while running an ionic framework build.
    – Khai Dinh
    Oct 21, 2014 at 4:37
13

For Arch 64 users, you must first enable multilib for pacman, then install the 32-bit packages:

sudo pacman -Syv lib32-libstdc++5 lib32-zlib
1
  • Worked like a charm (4.16.13-2-ARCH), I just had to replace my x64 image by x86 one
    – soywod
    Jun 21, 2018 at 17:25
6

For Fedora users:

sudo dnf install zlib.i686 libstdc++.i686
2
  • Thanks searching lot i got this answer and it works. Dec 5, 2016 at 10:22
  • luckily my centos is just the same like fedora :)
    – Dee
    Jul 12, 2017 at 2:23
-2

I installed ndk in the sdk manager and it worked.

1
  • 1
    SDK Manager -> System Settings -> Android SDK -> Checkbox "Android NDK" - 1.0.0 Installed. I still get the OP's error.
    – JosephK
    Feb 15, 2016 at 4:59

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.