Gradle Build Error in Android Studio

I am using Android Studio on Ubuntu. I launched Android Studio, created a “New Project” and started it with Shift+F10 . He made the following mistake:

 /home/laptop/AndroidStudioProjects/TestIt420/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-mdpi-v4/abc_btn_radio_to_on_mtrl_000.png Error:Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/laptop/Android/Sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 127 :app:mergeDebugResources FAILED FAILURE: Build failed with an exception. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Information:BUILD FAILED 

He also showed me a PNG file with a circle, a transparent background with a file name: abc_btn_radio_to_on_mtrl_000.png

After I just tried to run the application, I now have 2 errors instead of one:

 /home/laptop/AndroidStudioProjects/TestIt420/app/build/intermediates/explo ded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-hdpi- v4/abc_ic_ab_back_mtrl_am_alpha.png Error:Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/laptop/Android/Sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 127 Error:Execution failed for task ':app:mergeDebugResources'. > /home/laptop/AndroidStudioProjects/TestIt420/app/build/intermediates/explo ded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-hdpi- v4/abc_ic_ab_back_mtrl_am_alpha.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/laptop/Android/Sdk/build-tools/21.1.2/aapt'' finished with non-zero exit value 127 Information:BUILD FAILED 

Can you help me in solving the problem?

+4
source share
2 answers

Android has not yet built the SDK for the 64-bit version of ubuntu, and from your error, I can say that you are using the 32-bit SDK for the 64-bit OS.

You need to install 32-bit libraries to run the Android SDK on ubuntu.

Launch the terminal and install the following packages.

 sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 

and

Right-click on the file .../AndroidSDK/sdk/build-tools/21.1.2/aapt , open its Properties and make sure that you have checked . Allow the file to run as a program on the Permissions tab.

+7
source

You need to install these packages to solve this problem, because the Android SDK still does not work with 64-bit UBUNTU.

 sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1 
+10
source

All Articles