Gradle Build Exception : AAPT process not ready to receive commands - android

This might be duplicate question but after trying all solution I'm not able to solve following error:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: AAPT process not ready to receive commands
I tried all except one solution:
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
what exactly commands will be before executing this commands?? and if anyone have other solution than this please tell me, It will be very useful..

linux 64ver, install
lib32stdc++6(or lib32stdc++5)
lib32z1(maybe its name is lib32zlib)
you can search them here ,to confirm their real names in you linux distro repo. https://pkgs.org/

Go to Project structure by clicking (ctrl+shift+alt+s), in that go to Project tab change Gradle Version to 3.2 and Project Version to 2.2 .
This works fine for me.

The answer is simple .
inside the gradle module app change the build tool version to 23.0.3 , gradle version to 2.2.2

Related

Getting an error While configuring Android studio and SDK in Linux Virtual Machin

While Configuring Android Studio in the Linux virtual Machine I am getting this error saying .
AAPT err(Facade for 1855057992):
/scratch/gbuora/Android/Sdk/build-tools/26.0.2/aapt2:
/lib64/libc.so.6: version `GLIBC_2.14' not found.
(required by /scratch/gbuora/Android/Sdk/build-tools/26.0.2/aapt2)
It would be great If I can get any help on this.
This issue is happening you must have installed GLIBC_2.16 version which is latest and while executing command for aapt in android sdk it is trying to find GLIBC_2.14 version. So you will have to add the GLIBC_2.16 path in the system Path variable itself instead of putting in user path variable.
It looks like you don't have a high enough version of libc6.
From ask ubuntu:
sudo apt-get update
sudo apt-get install libc6

while running react native app i got this error

i already installed the build tools 23.0.1.but i got this error.
java.io.IOException: Cannot run program "/root/Android/Sdk/build-tools/23.0.1/aapt": error=2, No such file or directory
First make sure there is respective file exist or not, then please try this some action, that might solve your problem:
update latest android sdk tools
or
clean and rebuild after sync build.gradle
or
invalid cache /restart
if you are using jenkins then try this command in terminal: sudo apt-get install lib32stdc++6 lib32z1
if all the option didn't work just follow this link: Ant debug and ant release failed and "aapt" IOException error=2, No such file or directory" why can't I build my gradle on jenkins?
Hope this will help for you.

aapt finished with non-zero exit value 127

For 2 days, I have been trying to get a blank android activity to compile on intellij idea ultimate on Ubuntu 14.04 64-bit. This error has really stumped me:
Error:Gradle: Execution failed for task ':app:mergeDebugResources'.
> /home/guarddog/Documents/github/IcsTrac/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android-sdk-linux/build-tools/22.0.1/aapt'' finished with non-zero exit value 127
Note I have Java 8, Gradle 2.5 and /usr/local/android-sdk-linux/tools all in my $PATH.
I tried the advice here: Gradle build failed in Android Studio. But the error still occurs. How can I resolve this issue?
I meet the similar issue. I install lib32z1 and problem solved. Hope it could help.
Thanks #agustin.aliaga's answer in:
finished with non zero exit value
In my case, I had to install libz.so.1 library to make it work, on Ubuntu 15.04 with this command:
sudo apt-get install lib32z1
Later, I make a deep survey and found to support 32bit Android platform in ubuntu 64 os, one should install the 32bit library.
sudo apt-get install lib32z1 lib32ncurses5 lib32stdc++6
I usually just do Build> Rebuild Project or Clean Project
if that doesn't work then I go File> Invalidate/Caches Restart and choose Invalidate and Restart
Close Android Studio, delete build folders from your project location, than open AS and choose rebuild option.
Hope it help. Let me know if you still have that problem.
EDIT: Please, check also this issue:
finished with non zero exit value

Could not find method include() for arguments [:app] on root project Android Studio

I am trying to import an android project to Android studio,after importing and then clicking on the green run button :
FAILURE: Build failed with an exception.
Where:
Build file
'/home/myusername/prjcts/nomadx/settings.gradle' line: 1
What went wrong:
A problem occurred evaluating root project 'nomadx'.
Could not find method include() for arguments [:app] on root project 'nomadx'.
The content of the file settings.gradle
include ':app'
I solved the problem ; for those who have the same issue : You should build the gradle with the Terminal/console not with Android studio :
./gradlew assembleRelease
After getting this error on first setup:
capacitor.settings.gradle' as it does not exist
..I used two commands from that page: npx cap sync android and npm install --save #capacitor/core #capacitor/cli. I'm not sure which one fixed that error, but it gave me the one on this page. I didnt want to build Gradle again when Android Studio should have it, so I restarted it and it started downloading a bunch of Gradle stuff to: /home/user/.gradle. It then prompted me to upgrade Gradle.
I then got a similar error to the OP Could not find method include() for arguments [:app] on root project 'android' of type org.gradle.api.Project..
So finally running the above ./gradlew assembleRelease, this error was shown:
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager. All licenses can be accepted using the sdkmanager command line tool: sdkmanager.bat --licenses
I installed SDK sudo snap install android-sdk but didnt have it. Installed with sudo apt install sdkmanager and then sudo sdkmanager --licences (y) to accept.. and got the same error. Found sdkmanager under Tools in AStudio. Tried to update there, but failed. Opened with sudo android-studio, had to select /home/user/.config/Google/AndroidStudioX.Y

aapt not found under the right path

I just updated ADT, than the SDK and now I have in only one project the issue, that my aapt isn't found
Error executing aapt. Please check aapt is present at /opt/android/platform-tools/aapt
The path is correct, I checked twice and more times.
-rwxrwxrwx 1 martin martin 3,5M 2010-12-08 10:41 /opt/android/platform-tools/aapt
I can start aapt via console, the permissions are 777, I restarted eclipse, closed/reopened the project, restarted adb and finally my Ubuntu.
Some ideas why this might happen only at one project?
It seems that cleaning this specific project doesn't work but cleaning all open project does the trick.
I leave this question if someone else get this issue.
I found that this could be fixed by installing the ia32-libs package as the Android sdk requires 32-bit libraries.
I solved this problem by adding a / after my android-sdk path in...
Eclipse->preferences->android->SDK Location:
The aapt location has been changed recently. You can find it under:
/path/to/adt/sdk/buid-tools/android-[version]/aapt
In the terminal execute this command :
chmod a+x platform-tools/aapt
it solved the problem for me
(in 64bit you have to install ia32-libs with this command : sudo apt-get install ia32-libs)
Check you have Android SDK version required installed and the path in Eclipse->preferences->android->SDK Location is correct.
Check file permissions. Run:
chmod a+x aapt
If you are using Linux 64-bits. You'll see this hint:
Hint: On 64-bit systems, make sure the 32-bit libraries are installed: sudo apt-get install ia32-libs line 1 Android ADT Problem
To fix it, you'll have to install 32-bits libraries:
sudo apt-get install ia32-libs
or
sudo apt-get install lib32z1
Maybe you'll need to install other libraries (libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386) or the emulator (libsdl1.2debian:i386). In my case it was enough installing libstdc++6
sudo apt-get install lib32stdc++6
For more information you can check this question:
How to resolve Error executing aapt in Android/Eclipse?
Starting build-tool 23, aapt has been moved under the ./bin directory
waiting for Eclipse ADT to be updated , one can just create a symbolic link to aapt
cd <path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1
ln -s ./bin/aapt aapt
this will create a symlinc
<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/aapt
pointing to actual aapt tool laying here
<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/bin/aapt
and eclipse will be able to build android project back again :-)
My issue with aapt got solved by simply chmod a+x platform-tools/aapt
Following did the trick for me. Had to do the build dep as some of the lib dependencies were missing.
sudo apt-get install lib32z1
sudo apt-get build-dep lib32z1
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev
Restart eclipse
I didn't collide with this problem, but if you have ADT 8 revision or later, so you should read it's dependencies better: "ADT 8.0.0 is designed for use with SDK Tools r8. If you haven't already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do so." (http://developer.android.com/sdk/eclipse-adt.html)
I've run into this problem constantly and can not get R to be resolved to a variable after making projects clean, in addition to not being able to find aapt -
Error executing aapt. Please check aapt is present at C:\AndroidSDK\android-sdk-windows\platform-tools\aapt.exe
None of the suggestions on this page make any sense or have helped in anyway. I'm using nothing but API 8 onwards.
I solved this problem by checking 'build automatically' under project menu.
I have faced the same problem after updating the SDK. I find out that the AUTOGENERATE folder doesn't have any file. What I done is :
WINDOWS->ANDROID SDK MANAGER:
rollback the SDK version to 16
Install all the tool provided.
SDK TOOLS (Version 16)
Platform Tools
install the SDK 4.0
Restart the eclipse
It solved!
For me, the problem was that Eclipse 4.4 was looking for aapt without "bin/" at the end of the path.
Since I could not find a way to configure this path, I symlinked the aap executable from the "bin" subdirectory to the "23.0.0_rc1" directory one level higher. This works now.

Categories

Resources