Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep getting this error when I'm trying to compile with Gradle in Android Studio on UBUNTU 14.04

Error:org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/codywang/Documents/android-sdk-linux/build-tools/21.1.2/aapt'' :app:mergeDebugResources FAILED Error:Execution failed for task ':app:mergeDebugResources'.
Error: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/home/codywang/Documents/android-sdk-linux/build-tools/21.1.2/aapt''

I kept getting these errors when I'm trying to compile in Ubuntu 14.04 from Android Studio 1.1.

I have done some research on the internet, and found out this might caused by my 64-bit Ubuntu which incompatible with the 32-bit android-sdk

So I tried the following commands in order to install i386 packages.

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libstdc++6:i386 lib32z1 libsdl1.2debian:i386

I've installed all of those libs, but still got the same error. Any ideas of how to solve this problem? Thanks!

like image 520
Zijian Wang Avatar asked Oct 19 '22 15:10

Zijian Wang


1 Answers

change directorty to build-tools/21.1.2/ directory and run following command

chmod +x aidl dexdump bcc_compat dx llvm-rs-cc mainDexClasses zipalign arm-linux-androideabi-ld i686-linux-android-ld mipsel-linux-android-ld
like image 71
Vahid Haratian Avatar answered Oct 22 '22 03:10

Vahid Haratian