Cannot start Android device emulator on Linux

后端 未结 4 1739
抹茶落季
抹茶落季 2021-01-22 19:12

I used to launch and debug Android Studio apps on emulator without problems. However, recently I am constantly failing to start the emulator. Updating the SDK and system images

相关标签:
4条回答
  • 2021-01-22 19:42

    I was fiddling around on an issue like this on Fedora 32 for a couple of days.

    I had to to make system unload the free nouveau graphics driver and install/load the non free nvidia driver.

    Very useful:

    https://rpmfusion.org/Howto/NVIDIA

    To check which driver is loaded I used:

    lshw -c video

    It is difficult to grab the correct rpm package from rpmfusion.

    If nvidia is not loaded, then you can check:

    more /var/log/messages | grep nvidia

    It told me which driver series to use.

    After successful install of nvidia driver, I can use HW graphics option in AVD manager.

    0 讨论(0)
  • 2021-01-22 19:44

    Delete in your Android SDK the directory "libstdc++" in the directory "emulator/lib64". The emulator will use the system libraries now.

    0 讨论(0)
  • 2021-01-22 19:45

    Have you tried running AVD Manager from a terminal?

    Control the Emulator from the Command Line

    Here you will probably have more details of the errors that make the emulator not work fine.

    0 讨论(0)
  • 2021-01-22 19:58

    It turned out that the problem was due to the same old NVidia driver problems with Linux. To fix the crash, I opened AVD Manager from Android Studio (Tools->Android->AVD Manager), and then opened the virtual device settings. Then in the Emulated Performance section, next to Graphics, I selected Software rather than Automatic or Hardware. This does the trick and no more crashes occur for the emulator, though it seems considerably slower, than it used to be when Emulated Performance presumably used Hardware by default. The following screenshots will hopefully give a better hint on the solution.

    0 讨论(0)
提交回复
热议问题