在构建服务器上出现以下错误。
Baz
查看下载的jar,看来它正在寻找的文件在jar文件的根目录下。不确定为什么要在Download https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.2.0-beta05-4818971/aapt2-3.2.0-beta05-4818971-linux.jar
...
Caused by: java.io.IOException: Cannot run program "/root/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-beta05-4818971-linux.jar/43bd0f91870a1f4f8e99e05eefb192e9/aapt2-3.2.0-beta05-4818971-linux/aapt2": error=2, No such file or directory
at com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.startProcess(Aapt2DaemonImpl.kt:80)
at com.android.builder.internal.aapt.v2.Aapt2Daemon.checkStarted(Aapt2Daemon.kt:53)
... 8 more
Caused by: java.io.IOException: error=2, No such file or directory
... 10 more
使用的版本:
43bd0f91870a1f4f8e99e05eefb192e9/aapt2-3.2.0-beta05-4818971-linux/
答案 0 :(得分:2)
要使aapt正常工作(这也解决了我对avd的问题),只需运行以下两个命令:
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
应该有效!
答案 1 :(得分:0)
在我的特殊情况下,它位于高山linux发行版上,这使安装有些棘手。
基本上需要安装以下软件:https://github.com/sgerrand/alpine-pkg-glibc
Docker代码:
RUN echo "Installing standard dependencies..." \
&& apk add --no-cache --update --virtual=.build-dependencies \
ca-certificates \
wget \
# ---------------------------------------------
&& echo "Installing glibc..." \
&& wget https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -O /etc/apk/keys/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk -O /tmp/glibc.apk \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk -O /tmp/glibc-bin.apk \
&& apk add --no-cache /tmp/glibc.apk /tmp/glibc-bin.apk