gpt4 book ai didi

Docker 中的 Android 模拟器

转载 作者:IT老高 更新时间:2023-10-28 21:26:20 27 4
gpt4 key购买 nike

我正在尝试在 docker 容器中启动 Android 模拟器,但出现错误:

root@686d602e6ffa:~/android-sdk-linux/tools# ./emulator            
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:

- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.

Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.

但容器内的操作系统是 (uname -a)

Ubuntu SMP 2015 年 3 月 10 日星期二 20:06:50 UTC x86_64 x86_64 x86_64 GNU/Linux

手动启动 emulatox64-x86 工作正常:

android-sdk-linux/tools# ./emulator64-x86 
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.

If you *really* want to *NOT* run an AVD, consider using '-data <file>'
to specify a data partition image file (I hope you know what you're doing).

我可能会创建一个符号链接(symbolic link) - 但我认为这不是一个好的解决方案,因为可能需要模拟不同的架构

这个模拟器也应该由 Jenkins 启动,它存在于上述容器中

更新:正如@user2915097 建议的那样:
root@686d602e6ffa:/# 文件/bin/bash
/bin/bash:ELF 64 位 LSB 可执行文件,x86-64,版本 1 (SYSV),动态链接(使用共享库),适用于 GNU/Linux 2.6.24

最佳答案

仅供引用:我基于 FROM ubuntu:16.04 在 docker 上遇到了这个问题
最后通过安装“file” apt-get install file

解决了

显然模拟器使用 file 来查看 $SHELL,如果它不包含 "x86_64"它认为它是 32 位的。

关于Docker 中的 Android 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29089351/

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