After clean install of Android Studio I always get the error
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
and
Error:Execution failed for task ':Application:mergeDebugResources'. Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
Java is up to date and the path is set.
I am new to Android Studio, what should I try?
I ran into the same problem, and it turned out I had messed up the file permissions inside the android-sdk folder (more specifically android-sdk/build-tools/{version}), and some binaries were missing execution permissions.
In my case, I simply gave
x
permissions to the relevant files in that directory, but if you're not sure, I suggest you uninstall the android sdk, completely remove its directory and then reinstall it again.In my case, I did not need to re-download the sdk. I closed Android Studio and ran the following command in the Terminal:
...where, ~/Desktop/AndroidStudio was the folder structure after Root which I needed to mention in order to provide permission to read all the SDK packages and perform required operation as and when necessary by the Android Studio, because my Sdk folder was inside "~/Desktop/AndroidStudio".
I am running Android Studio 3.0.1 on Ubuntu 16.04 LTS. This worked for me perfectly :-)
Here how I fixed this Issue:
1.Deleted .gradle folder.
2.Closed android studio and run as administrator.
On Start android studio will rebuild the folder you deleted.
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
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
After this, rebuild your project and tadaaa.. problem resolved.
If you are on Windows 10 (sigh), close android studio and then right click on android studio icon and select 'Run as Administrator' from 'more' menu.
Build again.
If it is possible for you, please delete the build folder of project and test building android project with any other version of build-tools.
in my case, build-tools version: 26.0.2 had problem, I tested with 27.0.3 and it solved my problem unbelievably :)