How to get logs of Android Emulator crash on Mac?

2019-07-14 19:15发布

问题:

Android Emulator AVD closes on Mac as soon it is opened. How to check the error logs? In which location is it stored to examine the issue?

Edit: I happened to fix the issue myself. Answer below. In my case, I had to quit Docker.

回答1:

To see the logs when launching the emulator, I had to use the terminal directly.

First, $ANDROID_SDK_HOME/tools/emulator @device_name. For me it was /Users/rakshakhegde/Library/Android/sdk/tools/emulator @Nexus_5X_API_O.

In the logs it said that emulator: Failed to sync vcpu reg. So from this SO post I realized that any other running VM can interfere to open the emulator. In my case, it was Docker running in the background. After I killed it, got my emulator running.



回答2:

adb logcat works for me while running the emulator from AVD Manager in Android Studio 3.2.1