83

About every 4 second after I start the emulator device from my Android Studio project an error message is printed into the Run window. It's extremely annoying because it hijacks the focus. If I'm in the Debug window it switches to the Run window every 4 seconds because of this error no matter what I do.

This started a day ago, but I don't know what induced it. I use the same emulator devices for several months now. Maybe an upgrade of some portion of Android SDK? The external SDK Manager is not invokable any more.

enter image description here


The messages start to come right after I boot up this API 25 wear emulator. One workaround is to make that tab float, then it doesn't hijack my focus; I move it to my second monitor.


I also noticed I cannot connect my Android Wear app running on my physical device (I'm running physical phone with the emulated wear) with my emulator.

Csaba Toth
  • 10,021
  • 5
  • 75
  • 121
  • 6
    Same problem. Any resolution? – Joshua Pinter Mar 01 '17 at 18:13
  • Not that I know so far. Now that the external SDK manager is not available the one integrated into Andorid Studio seems like to give much less control over the bits and pieces. I don't seem have control over ARMv7 and x86 based emulators any more for example. I wanted to start my API23 wear emulator but it throws an error. – Csaba Toth Mar 01 '17 at 18:37
  • I thought I reinstall Android Studio and Android SDK to start with a clean slate. I'm on Ubuntu 16.10. I can download Android Studio, but the SDK is nowhere to be found any more. Supposedly Android Studio would contain it, but it bails out during first start looking for it. So if the Studio doesn't install it and I cannot download it separately, then I kinda stuck. I installed the Ubuntu repo's Android SDK, that is in /usr/lib/android-sdk with root privileges. Now I'm stuck – Csaba Toth Mar 01 '17 at 21:10
  • Managed to reinstall Studio & SDK – Csaba Toth Mar 01 '17 at 21:43
  • 1
    Created new wear emulators (API 23 and 25). The API 23 doesn't start, the API 25 has the same issue as in the posting. – Csaba Toth Mar 02 '17 at 00:19
  • So far I worked this around by debugging my physical Moto 360 which wasn't an easy run. Until I realized to not have the wear emulator and the physical wear active at the same time. – Csaba Toth Mar 02 '17 at 02:46
  • 1
    Which Android Studio Version you are using ? @Csaba_Toth – Tejas Pandya Sep 19 '17 at 10:38
  • @Tej, good question! v2.3.3, I'd need to try this whole scenario again with 3.x I guess – Csaba Toth Sep 21 '17 at 22:13
  • Did you try this? https://android.stackexchange.com/questions/64245/how-to-configure-internet-access-in-virtual-device – Vall0n Nov 04 '17 at 13:05
  • @Vall0n No, but I don't have any explicit proxies in my setup. First I'd like to try the project with 3.x Android Studio, but I'm bogged too much right now. – Csaba Toth Nov 04 '17 at 17:58
  • give a look to this link, it is an Android Tracked Issue. https://issuetracker.google.com/issues/37139091 – Massimiliano Catinoto Dec 08 '17 at 19:00
  • Good reference. Last time I tried I didn't see this, but I wasn't sure if my setup (excluding Android Studio) was the same as before – Csaba Toth Dec 08 '17 at 19:06
  • I expect this to be gone with Android Studio 3.x, as others told above. I *might* have time to look at it this weekend. – Csaba Toth Dec 08 '17 at 19:07
  • @MassimilianoCatinoto Why did you delete your answer? If it works I'll mark it as the right answer. Did someone downvote it? – Csaba Toth Dec 08 '17 at 21:45

2 Answers2

3

It is because you are connect to a network which has a auto-redirect in it or it is not encrypted(HTTP). Start by

  1. Disconnecting yourself from the network.
  2. Restarting Android Studio

If the problem continues try posting a more detailed description of the error If the problem doesn't continue contact your network administrator.

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
0

Maybe this can help:

  • Please make sure that you are connected to internet

Explanation: At startup, the emulator reads the list of DNS servers that your system is currently using. It then stores the IP addresses of up to four servers on this list and set up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4, 10.0.2.5 and 10.0.2.6 as needed. So, it needs internet connection to deal with them.

When starting the emulator at the command line, you can also use the -dns-server option to manually specify the addresses of DNS servers to use, where serverList is a comma-separated list of server names or IP addresses.

Rohit Sharma
  • 1,271
  • 5
  • 19
  • 37