Android 设备模拟器由于 Linux 权限错误而失败



我正在尝试在没有安卓工作室的情况下安装 Flutter,目前flutter doctor根据本指南给出了除安卓工作室和连接设备之外的所有刻度。我通过avdmanager创建了一个模拟器,如果我用flutter emulators --launch pixel运行它,它会卡在加载屏幕上,然后变得无响应。要获取更多信息,我可以使用${ANDROID_HOME}/emulator/emulator -avd pixel运行它,这执行相同的操作,但返回以下调试信息:

emulator: WARNING: IniFile.cpp:235: Failed to open .ini file /home/cameron/.android/avd/pixel.avd/hardware-qemu.ini for writing.
qemu-system-x86_64: -drive if=none,index=1,id=cache,if=none,file=/home/cameron/.android/avd/pixel.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576: Could not open '/home/cameron/.android/avd/pixel.avd/cache.img.qcow2': Permission denied
Killed

现在,由于这似乎是权限问题,因此我可以使用sudo运行相同的命令,并且它能够启动模拟器,但是当我使用虚拟电源按钮启动手机操作系统时,它会崩溃:

host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
E0619 23:22:33.309764951   29720 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1592572953.309674506","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android Emulator" checkbox
- Click "OK"
[29707:29707:0619/232311.505803:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

我尝试了我在互联网上找到的常见响应,即在 kvm 上使用 adduser,但这并没有改变任何东西。一些Windows用户建议将某些文件标记为可写文件,但由于我不知道哪个文件,我非常担心。PS 我在 Ubuntu 18.04 上。任何帮助将不胜感激!

试试

飘干净

,然后重新启动颤振

相关内容

  • 没有找到相关文章

最新更新