After clean install of Android Studio I always get the error
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server t
This error occurred because you might have accidentally remove the executable flag from aapt2
which is located in $ANDROID_HOME/build-tools/27.0.2
.
Try this:
followed by-
sudo chmod 777 -R $ANDROID_HOME
Note:
$ANDROID_HOME
is the location where I put android sdk
Hope this helps !!
You can run Android Studio as Admin.
I hope it will help you.
To Do So :
Best regards,
Had to uninstall Android studio and delete the following SDK folder in AppData folder Delete .gradle folder delete .AndroidStudio Projects folder
and did a fresh install which solved .
So after investigating the issue for long , I have a concrete solution . Let`s look into it.
Go to Android Studio -> Help -> Show Log In Files
In the subsequent folder that opens, open idea.log
This would present you with a log file which contains logs of processes right from when the studio started. Now in this file, you have to search for the possible issue. For some the issue might be due to
java.io.IOException: Cannot run program "/home/mmt/Android-Sdk/android-sdk-linux_x86/emulator/emulator-check": error=13, Permission denied
For some others, it may be some other. The point is that this file contains lot of irrelevant logs and you have to identify the one that is causing this issue. For me , after discovering the above issue, I granted permission to that particular folder using the below commands
cd $ANDROID_HOME/sudo chmod -R 777 emulator/
After this, rebuild your project and tadaaa.. problem resolved.
We ran into the same issue, and have been able to find the root cause: The error message means that Gradle cannot connect to some worker processes. In our case, the process was for 'aapt2'. Running 'ldd aapt2' indicated that some shared libraries were missing (mainly GLIBC). Since we're using Docker based on Alpine Linux, it comes with a reduced GLIBC (glibc-musl). The solution was to simply install glibc in the Docker container.
I suggest you run ldd build-tools/{version}/aapt2
to see which libraries are missing from the OS. You did not mention your OS, are you also using Docker and AlpineLinux ?
I already had latest version of build-tool
installed, so I just had to give permission to Android_home:
chmod 777 -R $ANDROID_HOME
and build again. This worked for me.