SO_REUSEPORT unavailable on compiling system to run emulator for andriod on Ubuntu

前端 未结 4 2318
梦谈多话
梦谈多话 2021-02-19 21:52

I was trying to install SDK and Emulator without the Andriod studio on Ubuntu 20.04. But got stuck at this error.

E0520 11:06:29.866803544    5261 socket_utils_c         


        
4条回答
  •  攒了一身酷
    2021-02-19 22:18

    Though not directly affected by the error you described, when stuck at this point (namely, when supposed to be connecting back to the ADB server, but can't), this can be a result of a corrupted quick-boot snapshot.

    What worked for me is to hard-delete the existing quick-boot snapshot, and have the emulator regenerate it on the next run.

    To delete the snapshots:

    rm -fr ~/.android/avd//snapshots/default_boot
    

    To regenerate the next snapshot, rerun the emulator as you normally would, then kill it after if full loads. But first, make sure that it is configured for saving a quick-boot snapshot on exit:

    Edit quickbootChoice.ini, for example:

    vi ~/.android/avd//quickbootChoice.ini
    

    The only line there should be:

    saveOnExit = true
    

    If you wish to see whether any of this is likely to help you before making any changes, run the emulator with the -no-snapshot argument applied, beforehand. For example:

    $ANDROID_SDK_ROOT/emulator/emulator -no-snapshot @Pixel_API_29 &
    

    (Or find a way to do this through Android Studio)

    A note regarding other answers here that advised configuring the camera differently (which seems unrelated): It is very likely that changing the camera setting, for the Emulator, is considered a configuration change - which ends up in forcing a cold-boot (i.e. skipping usage of the quick-boot snapshot), which can explain why it works (but with no voodoo involved).

提交回复
热议问题