1

I've installed Android Studio 3.0 on VirtualBox, OS Lubuntu.

During making project, there is an exception:

Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.

Error:Execution failed for task ':app:mergeDebugResources'. 
Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.

I've tried oracle-jdk8 and OpenJdk. The same promlem.

Srini V
  • 11,045
  • 14
  • 66
  • 89

3 Answers3

0

Not quite sure what your compile issue is, but regardless once you get past that you will more than likely run into the issue of not being able to run the Android Studio emulator with VirtualBox. Assuming you want to run the emulator my point being you may be wasting time trying to fix your issue. See the following old post Android emulator and virtualbox cannot run at same time.

Best to run Android Studio on your host machine.

jasonlam604
  • 1,456
  • 2
  • 16
  • 25
0

I've been able to find the root cause: The error message means that Gradle cannot connect to some worker processes. In my case, the process was for 'aapt2'. Running 'ldd aapt2' indicated that some shared libraries were missing (mainly GLIBC). Since I'm using Docker based on Alpine Linux, it comes with a reduced GLIBC (glibc-musl). The solution was to simply install glibc.

Here is the complete Dockerfile for reference, although the missing libraries might be different for your distribution.

FROM openjdk:8-alpine

LABEL maintainer="Barry Lagerweij" \
  maintainer.email="b.lagerweij@carepay.co.ke" \
  description="Android Builder"

COPY android-packages /tmp/android-packages
RUN apk add --no-cache wget unzip ca-certificates \
  && wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub \
  && wget -q -O /tmp/glibc.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.26-r0/glibc-2.26-r0.apk \
  && wget -q -O /tmp/glibc-bin.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.26-r0/glibc-bin-2.26-r0.apk \
  && apk add --no-cache /tmp/glibc.apk /tmp/glibc-bin.apk \
  && wget -q -O /tmp/android-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip \
  && mkdir -p /tmp/android-sdk/licenses \
  && unzip /tmp/android-tools.zip -d /tmp/android-sdk \
  && rm /tmp/android-tools.zip \
  && echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > /tmp/android-sdk/licenses/android-sdk-license \
  && echo "84831b9409646a918e30573bab4c9c91346d8abd" > /tmp/android-sdk/licenses/android-sdk-preview-license \
  && echo "d975f751698a77b662f1254ddbeed3901e976f5a" > /tmp/android-sdk/licenses/intel-android-extra-license \
  && mkdir ~/.android; echo "count=0" >> ~/.android/repositories.cfg \
  && /tmp/android-sdk/tools/bin/sdkmanager --package_file=/tmp/android-packages \
  && apk del wget unzip ca-certificates \
  && rm -rf /tmp/android-sdk/extras /tmp/android-sdk/tools/lib/x86 /tmp/android-sdk/tools/lib/monitor-* /tmp/glibc.apk /tmp/glibc-bin.apk /etc/apk/keys/sgerrand.rsa.pub

RUN mkdir /tmp/project \
  && echo "sdk.dir=/tmp/android-sdk" > /tmp/project/local.properties
ENV ANDROID_HOME /tmp/android-sdk
WORKDIR /tmp/project

I suggest you run 'ldd build-tools/26.0.2/aapt2' to see which libraries are missing from the OS.

blagerweij
  • 3,154
  • 1
  • 15
  • 20
  • it is the output in my osx, how can I find which library is missing? @blagerweij /libc++.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) – Parissa Kalaee Jan 19 '18 at 03:59
0

I had this problem on lubuntu-32 bit. easiest solution is to use lubuntu-64 bit.