"waiting for target device to come online" in Android Studio 2.3

AndroidEmulation

Android Problem Overview


Recently upgraded to Android Studio from 2.2.3 to 2., running on Win10

Emulator stopped working since then. Tried installing other images(25 rev 4)/upgrading for AVD but nothing seems to work. After running gradle and showing "waiting for target device to come online" in task bar nothing happens and program doesn't run.

Kindly help


Adding Screenshot:

enter image description here

And:

enter image description here

Android Solutions


Solution 1 - Android

I was also having the same issue 2 days ago when i update my android studio, today I solve my issue when I was playing around with settings then I saw that in my SDK tools setting Android Emulator is uncheck so I simply checked that box and now emulator is working fine.

Try this steps may work for you also:

  1. Go to SDK tools > SDK Tools
  2. Check Android Emulator and click Apply

[![enter image description here][2]][2]


[1]: https://i.stack.imgur.com/JBL1U.png [2]: https://i.stack.imgur.com/N2rSq.png UPDATE:

There are changes, though it's installed, you might need to update

[![enter image description here][1]][1]

Solution 2 - Android

I already have Emulator installed. But still had the same problem this morning with Ubuntu 16.04 and Android Studio 2.3,Below is what I did and it worked.

Double Check to see if these are available:

    sudo apt-get install lib64stdc++6:i386    
    sudo apt-get install mesa-utils
  1. Locate the lib64 folder. On Ubuntu 64 bit, its located under ~/Android/Sdk/emulator/lib64.

  2. In terminal, Navigate to the ~/Android/Sdk/emulator/lib64 folder ,then run the following commands:

move the libstdc++ file inside the folder libstdc++.bak and provide softlink

mv libstdc++/ libstdc++.bak
ln -s /usr/lib64/libstdc++.so.6 libstdc++

Solution 3 - Android

None of these solutions worked for me. After removing and installing the emulator from scratch several times, and also SDK Tools, I saw under developer options in the emulator that USB debugging was not active.

  • Settings
  • About Emulator Device
  • Click several times on Build Number until it says that you are a developer
  • Go back
  • Get into developer options
  • Put a check on "USB debugging"

Solution 4 - Android

if you docker is running you should close it.

Solution 5 - Android

I realized my emulator was actually frozen, despite restarting it and restarting my computer. I just had to wipe data (AVD Manager > right-click on emulator > Wipe Data) and it started working again. You'll lose any state you had, but at least you won't have to reinstall it.

Solution 6 - Android

First delete your exiting emulator than recreate it. Now run again hope it will fix your error.

Solution 7 - Android

I was experiencing the same issue where the emulator would start up but I would be left with a black screen and my app won't load up. Anyway, what I did was, I accessed the setting of the emulator. Make sure the "Save quick-boot state on exit for AVD Pixel_2_API_26" is set to "No". Note: My device is a Pixel 2, it could be different for other users. Extended Controls

Solution 8 - Android

I had the same problem ,I was using

> Linux LinuxRobot 4.14.0-kali3-amd64

and getting this

> host doesn't support requested feature: CPUID.80000001H:ECX.abm

and this message

> waiting for target device to come online

Solution Close debugging and current emulator then

Open Avd Manager ,you will be able to see your device there then click on play button

enter image description here

Or Try Cold Boot

Open Android virtual device manager,click on drop button after select cold boot. read this

enter image description here

Solution 9 - Android

Try configuring different Android Emulator and using it while running. You current emulator may have some issues. It worked for me.

Solution 10 - Android

I had a similar problem when updated my android studio. Somehow it changed my SDK path. I just changed it to my updated SDK path and it worked.

Android Studio -> File -> Settings -> Appearance & Behaviour -> System Settings -> Android SDK

Here you will find Android SDK location just click on edit link in front of that and browse and select the Android SDK from the file browser. Select and click on Apply.

Select AVD manager and start Emulator. This solution worked for me.

Solution 11 - Android

If none of the previous answers solved your problem, I suggest you to check KVM errors. Even if you did not install KVM it's possible you to get KVM errors when you try to run x86 images. Open a terminal and type dmesg | grep kvm after starting emulator. This way you will be able to see if you get KVM errors.

On my Ubuntu 16.04 machine with Android Studio 2.3.3 installed on it, the problem was about KVM. Android Studio was trying to enable KVM for x86 images. When I try to start the emulator, dmesg showing errors "kvm: enabling virtualization failed." Although ARM images were working fine.

After installing KVM, I was able to run x86 images on emulator without errors.

If this is the problem you are encountering, you might want to checkout KVM installation page.

Solution 12 - Android

  • first delete your AVD from tools>avd manager
  • close android studio and restart computer
  • open android studio click on run button on toolbar and click on create new virtual device from there

worked for me

Solution 13 - Android

I had another Android emulator running in the background, completely separate from Android Studio. I saw it in the list when I loaded ADB, so it was detected for some reason, but I ignored it. Anyway, when I closed it, this error went away and I was able to load my app no problem. Specifically, I had BlueStacks loaded. So, if you use BlueStacks or another Android emulator, close that as that might be the problem.

Solution 14 - Android

Try this.

Click on App-->Edit configuration enter image description here

choose "Specified activity".

enter image description here

Then in activity, choose your main activity(or whatever name you gave it), then click Ok. enter image description here

Then in "target" choose "open select deployment target dialog". enter image description here

Click "Apply" then "Ok".

Solution 15 - Android

I couldn't get any solutions working and I tried almost every solution. What actually worked for me was something I accidentally stumbled upon. I opened two Android Studio applications and ran one and let it stay "waiting for target device to come online" and went to my other app that I want to run and run that but there will be an option under connected devices when you go to choose your avd, choose that one. It will connect to the avd you are using in the first app you ran and work.

Solution 16 - Android

For anyone who is having the issue now and non of the solutions worked. Try this:

I was having the same issue and it was actually caused by android Q preview. I created a device with Pie and everything just works.

Solution 17 - Android

After trying Cold Boot and other stuff, I removed Android Emulator from SDK Tools, and then reinstalled. But first, I reinstalled HAXM too, because I recalled that I had an error message when installing by first time.

HAXM error

To install HAXM I had to disable Hyper-V on Windows 10, basically running:

bcdedit /set hypervisorlaunchtype off

like stated here: https://github.com/intel/haxm/issues/105#issuecomment-430484231

After that, I reinstalled Android Emulator. It's just unchecking the box, applying the change, checking it again and applying the change. But you can follow more detailed steps here: https://www.technipages.com/android-emulator-stuck-waiting-for-target-to-come-online

After that, I have my AVD running.

Solution 18 - Android

After lots of attempts, stopping device from AVD(exactly from AVD, not by cross button nor power off button on emulator) and starting build again helped me.

Solution 19 - Android

Upgrade your Display driver ... this worked for me!

Solution 20 - Android

maybe you do not have SDK of your simulator,please check File->Settings->Appearance&Behavior->SystemSetting->Android SDK

Solution 21 - Android

I had to turn off Parallels Desktop and it started working again without reboot.

Solution 22 - Android

For me what was happening was the Virtual device never booted.

What fixed this was:

cd ~/.android/avd/<Name of virtual device>/
rm *.img

Then I restarted the virtual device and it came on line.

Solution 23 - Android

I tried doing a “Cold Boot Now” in the device, but got an error saying: AVD Pixel_API_24 is already running. If that is not the case, delete the files at /.android/avd/Pixel_API_24.avd/*.lock.

After deleting a .lock file in the suggested folder the “Cold Boot Now” worked and the device was back to normal.

Solution 24 - Android

I have the same issue with the new update about Quick boot.

Unfortunately I had to disable it to make the emulator working again.

Android Studio -> tools -> Android -> AVD Manager -> edit your emulator -> Show Advanced Settings -> select Cold boot

Solution 25 - Android

I deleted all my AVD files and recreated an AVD.

  • (In windows), delete all files in C:\Users\MyName\.android\avd\
  • Android Studio > Tools > AVD Manager > Create Virtual Device ...
  • etc.

At this point in time I was on Win10, Android Studio 3.1.2

Solution 26 - Android

I solved by modifying my configuration on AVD.

  1. Go to the AVD Manager

  2. Click "Edit this AVD" Button (the pencil icon).

I had no device selected and it showed an error message that I need to select a device for the AVD to work. Once I did that and saved my emulator worked.

Solution 27 - Android

Restarting the computer solved it for me.

Solution 28 - Android

Setting the system variable ANDROID_SDK_ROOT to the path used by Android studio solved the issue for me:

  • In Android Studio fire up Tools>Android>SDK Manager, navigate to Appearance & behavior>System Settings>Android SDK

  • Copy the path from "Android SDK Location"

  • Add ANDROID_SDK_ROOT to your system variables and assign the path

  • Restart Android Studio

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfidelisView Question on Stackoverflow
Solution 1 - AndroidMoiz FarooqView Answer on Stackoverflow
Solution 2 - AndroidNeha RajView Answer on Stackoverflow
Solution 3 - AndroidlcompareView Answer on Stackoverflow
Solution 4 - AndroidvolkanView Answer on Stackoverflow
Solution 5 - AndroidKenView Answer on Stackoverflow
Solution 6 - AndroidAhmer AfzalView Answer on Stackoverflow
Solution 7 - AndroidTimetravellerView Answer on Stackoverflow
Solution 8 - AndroidTAHA SULTAN TEMURIView Answer on Stackoverflow
Solution 9 - Androiduser8008476View Answer on Stackoverflow
Solution 10 - AndroidswapnilView Answer on Stackoverflow
Solution 11 - AndroidRoot GView Answer on Stackoverflow
Solution 12 - AndroidHamidrezaView Answer on Stackoverflow
Solution 13 - AndroidPeter GriffinView Answer on Stackoverflow
Solution 14 - AndroidJohira AfzaliView Answer on Stackoverflow
Solution 15 - Androidjor2View Answer on Stackoverflow
Solution 16 - AndroidAnnaView Answer on Stackoverflow
Solution 17 - AndroidmayidView Answer on Stackoverflow
Solution 18 - AndroidPavlusView Answer on Stackoverflow
Solution 19 - AndroidRussoView Answer on Stackoverflow
Solution 20 - AndroidkyleView Answer on Stackoverflow
Solution 21 - AndroidVladView Answer on Stackoverflow
Solution 22 - AndroidJohn LaBargeView Answer on Stackoverflow
Solution 23 - AndroidMariliaView Answer on Stackoverflow
Solution 24 - AndroidAhmad MelegyView Answer on Stackoverflow
Solution 25 - AndroidJohn BentleyView Answer on Stackoverflow
Solution 26 - AndroidJohn81View Answer on Stackoverflow
Solution 27 - AndroidSamilView Answer on Stackoverflow
Solution 28 - AndroidMR86View Answer on Stackoverflow