I'm trying to run a Gradle build within a Docker Ubuntu machine.
The application i'm compiling is supposed to generate an .apk file and so I'm using the aapt packager which comes as part of the Android SDK build-tools which I've installed using the following command:
android update sdk -u -a -t 7
(Android SDK Build-tools, revision 23.0.3)
But then, when I run Gradle it fails with the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Company-ServicesSDK:processReleaseResources'.
> A problem occurred starting process 'command '/Users/itai/repos/Company-Android_fork/.gradle/android-sdk-linux/build-tools/23.0.3/aapt''
Through my Macbook I'm able to run the aapt and it works properly but from within the Docker machine, when I try to run it, I get:
bash: ./aapt: No such file or directory
Running file aapt
from my Mac:
aapt: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, not stripped
Anyone knows why it happens and how to solve it?
If it interest anyone, I found that in order to fix this issue I had to install the following packages:
lib32z1
gcc-multilib
make
After installing these packages, running aapt gave me the proper output.