12

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_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1589952989.866791260","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}
checkValid: hw configs not eq
Axifive
  • 1,159
  • 2
  • 19
  • 31
Vishnu Muskawar
  • 129
  • 1
  • 3
  • Does this answer your question? [Android Emulator gives an Error SO\_REUSEPORT and debugging not working](https://stackoverflow.com/questions/61839898/android-emulator-gives-an-error-so-reuseport-and-debugging-not-working) – ThatsMe Jul 26 '20 at 20:17

4 Answers4

2

I got the solution from this article:

So in order to fix this, I just disabled the Camera by switching the option from Emulated to None and that was all.

Don't ask why this works, but it seemed to solve it for me.

andras
  • 3,305
  • 5
  • 30
  • 45
  • Same problem, after working for a lot of hours with a nicely working emulator. The article link is dead, but you mean to open AVD Manager, edit the virtual device, click Advanced Settings, and configure the camera to None. This worked for me, but I also created a new, simpler virtual device, so I don't know which action actually solved the error message. In fact, the error msg still shows, but my app appears again nicely on each virtual device emulator – Roland Aug 09 '20 at 10:59
  • Just as you described. This solved the debugging for me, error still shows. I think that maybe recreating the emulator was the actual solution and the initial problem came from having multiple debugging sessions for the same device (Flutter and native). Really don't know what solves it, but I am glad it works for you as well. – andras Aug 09 '20 at 11:03
  • Works for me! Note: The camera option "virtual scene" works as well, so if you want to use your computer camera, have a look into this option. – randmin Mar 19 '21 at 14:59
0

Install Android SDK Platform tools. if already exist uninstall and install Android SDK Platform tool in ubuntu 20.04

0

Seems a GPU issue, try :

sudo ubuntu-drivers autoinstall

Or (or both) change graphic emulated performance to software if your emulated device allow it.

Had same issue with linux mint android studio .. Hope it will help.

Gauthier
  • 13
  • 5
0

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/<AVD name>/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/<AVD name>/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).

d4vidi
  • 2,407
  • 26
  • 27