问题
I tried to debug my Android app on Chrome OS emulator in Android studio. This is the tutorial I followed: https://developer.android.com/topic/arc/emulator
The problem is, it crashes on startup. If I try to launch it via terminal, I get this output:
./emulator -avd Pixelbook_beta_API_25
emulator: WARNING: encryption is off
emulator: WARNING: Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please use '-device usb-...' instead
virto-goldfish-pipe fatal error: init:475: Could not get virtio gpu ops!
Abort trap: 6
When googling I found only this question, but top solution didn't help me because macOS Catalina spits out a message "Developer can't be verified"
https://stackoverflow.com/a/60819386/9815389
About the environment: I am using macOS 10.15.4, Android Studio 3.6.3. Settings for the emulator are standard, except for the ram which I bumped up to 2048 MB as Google documentation recommends
回答1:
I am also using a Mac running Catalina and face the same problem when I try to start the emulator, even when done from the command line. Specifically, I get an alert which states: “qemu-system-x86_64” cannot be opened because the developer cannot be verified.
The solution to this problem is simply to allow the "qemu-system-x86_64" program to run. To do so, follow these steps:
- Try to run the emulator again and wait for the alert to be shown.
- Click "Cancel" on the alert.
- Go to System Preferences > Security & Privacy > General.
- Near the bottom you should see a header called "Allow apps downloaded from:". Make sure you have the "App Store and identified developers" option selected.
- You should see an "Allow Anyway" button to the right of some text which says: "qemu-system-x86_64" was blocked from use because it is not from an identified developer. Click the "Allow Anyway" button.
- Try running the emulator again.
- You should see the same alert as before, except now there should be an "Open" button. Click the "Open" button.
- You might see more (possibly a lot) "cannot verify" alerts without "Open" buttons for different program files which the emulator uses. If this is the case, repeat steps 2 through 8 until the emulator runs correctly. It may take awhile, but eventually the emulator will run.
Here's a screenshot of my Security & Privacy Page:
来源:https://stackoverflow.com/questions/62069163/chrome-os-emulator-is-crashing-on-startup