Android Studio 3.0 - No server to serve request

后端 未结 15 1574
北恋
北恋 2020-11-28 14:55

After clean install of Android Studio I always get the error

Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server t

相关标签:
15条回答
  • 2020-11-28 15:32

    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:

    • Re-download the sdk (recommended)

    followed by-

    • sudo chmod 777 -R $ANDROID_HOME

    Note: $ANDROID_HOME is the location where I put android sdk

    Hope this helps !!

    0 讨论(0)
  • 2020-11-28 15:33

    You can run Android Studio as Admin.

    I hope it will help you.

    To Do So :

    1. Right click
    2. choose Run as Administrator

    Best regards,

    0 讨论(0)
  • 2020-11-28 15:34

    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 .

    0 讨论(0)
  • 2020-11-28 15:35

    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.

    0 讨论(0)
  • 2020-11-28 15:41

    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 ?

    0 讨论(0)
  • 2020-11-28 15:44

    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.

    0 讨论(0)
提交回复
热议问题