Android Studio 3.0 - No server to serve request

2020-01-25 10:51发布

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?

14条回答
欢心
2楼-- · 2020-01-25 10:53

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.

查看更多
【Aperson】
3楼-- · 2020-01-25 10:54

In my case, I did not need to re-download the sdk. I closed Android Studio and ran the following command in the Terminal:

sudo chmod 777 -R ~/Desktop/AndroidStudio

...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 :-)

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2020-01-25 10:56

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.

查看更多
该账号已被封号
5楼-- · 2020-01-25 10:57

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.

查看更多
SAY GOODBYE
6楼-- · 2020-01-25 10:58

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.

查看更多
够拽才男人
7楼-- · 2020-01-25 11:00

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 :)

查看更多
登录 后发表回答