2

A couple of days ago (15th April 2017) I updated Android Studio with all the latest updates. Now when I try to run an app, the emulator window opens but I just get a message "waiting for device to come online". Eventually this times out and I get a message "installing APK", where it just seems to get stuck. I have searched the site and tried various advice including:

  • Deleting all the emulators and re-creating
  • Turning off the emulator in SDK manager, re-starting Android Studio and turning the emulator on again
  • turning off instant run
  • re-booting my PC, in case some update needed a re-start

The emulator I have is Nexus5X API23.5554

I have also deleted my app and created a completely new "hello World" app that does nothing but display one line of text, but I still get the same problem.

Has anyone any other ideas?

Christopher S
  • 49
  • 1
  • 4
  • 1
    Hi, I would suggest to ask this question directly to Android developers team by filing a ticket in the website since its a software defect. I also experience this kind of issue and I have no idea why it fix by itself. – Enzokie Apr 17 '17 at 12:50
  • If the emulator is already open, then running the app sometimes gives the message "Installation failed with message null - It is possible that the issue is resolved by uninstalling the existing app & reinstalling. Do you want to uninstall?". Clicking yes has no effect – Christopher S Apr 17 '17 at 12:51
  • Can you check [this](http://stackoverflow.com/questions/32718044/android-studio-application-installation-failed)? – Enzokie Apr 17 '17 at 12:55

7 Answers7

2

I ran into this issue too. It seems to be a bug with recent changes to the Android emulator. There is a workaround:

  1. Launch the emulator independently from the Android Virtual Device (AVD) manager (there's an icon in the main Android Studio window)
  2. Run your app. You'll notice the device name has changed from whatever the emulator is called to some generic name like 'Android x86 API 25'.
  3. The app will run correctly on the emulator. You'll notice in logcat that the device name is 'emulator unknown'.

Hopefully Google will fix this over the next few days.

jgads
  • 257
  • 1
  • 3
  • 13
1

I couldn't get any emulator going at all, with no error messages, just 'waiting for device to come online'.

When tried to stop and start adb.exe in terminal:

adb kill-server adb start-server

it said that adb is outdated. I had latest adb version downloded but Android Studio was trying to use some other file which was older version. Finally, I checked environment variables and removed paths to:

C:\NVPACK\android-sdk-windows\platform-tools and C:\NVPACK\android-sdk-windows

as the newest version of SDK platform-tools I had on drive E: not C:, and is all working now.

Pawel
  • 11
  • 1
0

Enzokie - Thanks. Nothing there seems to work, though. As a novice, I always assume that if something is wrong, it's my fault, but maybe not this time! I shall do as you suggest and raise it with Android unless anyone else suggests something that works.

Christopher S
  • 49
  • 1
  • 4
0

My work around was to use a Nexus 5 instead of Nexus 5X.

If you don't know how to make an new emulator its tools>android>AVD manager> create new virtual device. Then just pick a new emulator and hit next until you're finished or customize it.

Kalcifer
  • 1
  • 1
0

Resetting the ADB did the trick for me. For Mac, In Android Studio -> Tools -> Android -> Android Device Monitor -> Under devices -> Down arrow there will be reset ADB option.

Fenil
  • 1,194
  • 10
  • 11
0

What worked for me was to wipe the emulator data. You can do this from AVD manager:

Tools -> AVD Manager -> Right click on virtual device - > Wipe Data

Sarantis Tofas
  • 5,097
  • 1
  • 23
  • 36
0

Hi I had the same Problem...so I did this:

Start your emulator, you will get the "wating for device to come online" error msg. Wait till the emulator boots, then stop the process. Now, on the emulator go to settings and make your "device" (emulator) to a developer device.

Check this, if you dont know how to do it -> https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/

Then go on "Developer options" (in settings) and switch on the "usb-debugging" option. Remeber you PCs fingerprint.

Hope this was helpfull....

Rafael Marques
  • 211
  • 2
  • 4