gpt4 book ai didi

Android sdkmanager --licenses 卡住而没有任何输出

转载 作者:行者123 更新时间:2023-12-02 19:58:28 24 4
gpt4 key购买 nike

我有一个像这样的 Dockerfile:

FROM debian:9
RUN apt-get update -y && \
apt-get install -y --no-install-recommends wget unzip openjdk-8-jdk
RUN wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -O sdk-tools-linux.zip
RUN unzip sdk-tools-linux.zip

当我跑
docker run -it my-image /tools/bin/sdkmanager --licenses它只是卡在那里一百万年。

后来我改变了一些东西,并开始收到这个奇怪的错误信息:
Exception in thread "main" java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /proc/self/task/1/cwd/etc/ssl/certs/T??RKTRUST_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??_H5.pem
at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at com.android.repository.io.impl.FileSystemFileOp.toPath(FileSystemFileOp.java:284)
at com.android.repository.io.impl.FileSystemFileOp.isDirectory(FileSystemFileOp.java:169)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:225)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:226)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.collectPackages(LocalRepoLoaderImpl.java:201)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:123)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:518)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:397)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:365)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:725)
at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:296)
at com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.setSdkHandler(SdkManagerCliSettings.java:101)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.<init>(SdkManagerCli.java:95)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:74)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)

我感到很无助。

最佳答案

你这个傻瓜!为什么要将 android sdk zip 解压缩到 docker 镜像的根目录中?把它移到根之外,一切都会好起来的!

FROM debian:9
RUN apt-get update -y && \
apt-get install -y --no-install-recommends wget unzip openjdk-8-jdk
RUN wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -O sdk-tools-linux.zip
RUN mkdir -p /sdk
RUN mv sdk-tools-linux.zip /sdk
RUN cd /sdk && unzip sdk-tools-linux.zip
docker build . -t my-image && docker run -it my-image sdk/tools/bin/sdkmanager --licenses

关于Android sdkmanager --licenses 卡住而没有任何输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56175616/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com