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

29

54

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

Blameworthy answered 13/3, 2017 at 6:51 Comment(6)
Have you killed your adb ?Ideomotor
try to invalidate cache and restart from File menuHeteronomous
Already tried doing it... still no luck.Blameworthy
see another solution : disable / enable adb integrationWenona
Possible duplicate of Error while waiting for device: Time out after 300seconds waiting for emulator to come onlineJapheth
This may sound ridiculous but after hours of trying many SO solutions what worked for me was to completely remove Android Studio and reinstall without importing any settings. See https://mcmap.net/q/35932/-how-to-completely-uninstall-android-studio-on-macAssamese
P
86

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


UPDATE:

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

enter image description here

Perpetuate answered 15/3, 2017 at 9:10 Comment(5)
Fell back to using genymotion. Never got the built-in emulator to launch.Weaks
Haha! This simple fix worked for me. You'd think this would be downloaded and updated automatically by the system once the user creates an Android Virualization Device. Ridiculous! Had me running in circles.Scant
Thanks dude. Updating Android Emulator solved the issue.Ithaca
did not fix on 3.1.3Aeolian
This fixed the issue for meGuth
A
37

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++
Arnoldarnoldo answered 25/5, 2017 at 10:17 Comment(9)
Following this answer solved the problem for me. No device was coming online after I upgraded to ubuntu 17.04 and at the same time I upgraded Android Studio to version 2.3.2.Nannienanning
Fixed issue and gets the +1, but an explanation of why this works and/or what the actual problem causing it is would be appreciated.Halyard
First of all, this trick doesn't solve this problem in my case. Plus I have some doubts here. As of Android Studio 2.3.3 both of your mentioned dependencies lib64stdc++6:i386 and mesa-utils are already there in the emulator directory - ~/Android/Sdk/emulator/lib64/lib64stdc++ and ~/Android/Sdk/emulator/lib64/gles_mesa. The file on ~/Android/Sdk/emulator/lib64/lib64stdc++ location is libstdc++.so.6. Why do I need to create symbolic links between these 2 location?Redouble
Neha Raj, thank you very much, the only solution that's worked for me. One suggestion though. However in my case all this had to be done in the ~/Android/emulator/lib64 directory.Drunkard
Fixed the issue in Kali Linux 2017.1, Android Studio 2.3.3... Thanks!Misconstrue
This incomprehensible paganistic Linux blather solved my problem too!Ariannaarianne
Thanks it worked, can someone explain what did I do :)?Leakey
work for me on ubuntu17.04 with android studio 2.3.3, thanks a lot, a little more explaination would be more greatAcacia
Thanks, not sure I would be able to figure this out without this answer :)Mending
P
20

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"
Pinot answered 14/6, 2017 at 3:54 Comment(2)
This should be the accepted answer, it worked for me and is quite an undocumented wayEbony
Additionally I needed to open Tools->AVD Manager and STOP the running emulator. Then run the app and select the stopped emulator. When it starts there should be a prompt to "allow USB debugging" - select yes. That fixed it for me.Stoup
L
18

if you docker is running you should close it.

Loftin answered 14/3, 2017 at 8:52 Comment(2)
I have tried by restarting my pc even. anything else i can try for?Blameworthy
Offical answer; > You can't run software that uses another virtualization technology at the same time that you run the accelerated emulator. For example, VirtualBox, VMWare, and Docker currently use a different virtualization technology, so you can't run them at the same time as the accelerated emulator. emulator-accelerationLoftin
T
11

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.

Tanjatanjore answered 6/2, 2019 at 22:52 Comment(0)
C
6

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

Cryoscope answered 13/3, 2017 at 6:55 Comment(10)
deleted and recreated it... In fact downloaded other versions even to check if any issue with versions but still no changes... Emulator just dont come up.Blameworthy
Add screenshot for further assistanceCryoscope
added... pls ask for any more info :)Blameworthy
First time you're trying to running AVD? Try Genymotion Android Emulator, if it also won't working then update your Display driver or upgrade your PC.Cryoscope
No am not trying to run it for the first time... earlier it was working fine.. after i upgraded from android studio from 2.2.3 to 2.3 it stopped working.. and my os, display driver all is updated to latest versions. Is there is any way to log what is happening when it says “waiting for target device to come online”Blameworthy
try #42612968Cryoscope
No solution there and moreover its Linux based and am on WindowsBlameworthy
Is there is anyway i can delete all emulator data and re install it without removing complete Android Studio as no solution seems to work...? I had tried removing adb ie virtual devices listed and removing and re downloading android images used for emulation...!!!Blameworthy
I recommend you install your new windows and reinstall it.Cryoscope
We need to be practical dude... just for trying an IDE if I have to reinstall everything then better leave it.... how come an IDE doesnt have option to track issue even... resolution is next...!!!Blameworthy
W
3

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

Wireman answered 23/1, 2018 at 4:25 Comment(2)
How did you open up the settings? I can't seem to find it.Perez
Have a look at the bottom right corner of the photo. Those 3 dots, once you click them, it should open the Extended controls window and Select the Settings tab.Wireman
O
3

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

Oncoming answered 25/8, 2018 at 10:4 Comment(0)
C
2

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

Currie answered 13/5, 2017 at 22:16 Comment(0)
C
1

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.

Crwth answered 30/5, 2017 at 14:15 Comment(1)
Rather than providing such a short answer, can you go into details of how the SDK can be changed?Sauger
C
1

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.

Caleb answered 10/10, 2017 at 13:56 Comment(0)
B
1
  • 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

Brahmi answered 2/8, 2018 at 6:46 Comment(0)
R
1

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.

Robison answered 18/8, 2018 at 10:16 Comment(0)
E
1

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".

Ecklund answered 1/1, 2019 at 23:23 Comment(0)
G
1

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.

Guntar answered 28/3, 2019 at 5:47 Comment(0)
B
1

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.

Bias answered 3/4, 2019 at 23:37 Comment(0)
S
1

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.

Straightlaced answered 10/8, 2019 at 15:25 Comment(0)
T
0

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.

Twi answered 18/4, 2017 at 15:21 Comment(0)
I
0

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

Isometrics answered 20/4, 2017 at 1:42 Comment(0)
H
0

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

Hagi answered 26/4, 2017 at 8:14 Comment(0)
C
0

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

Coincidentally answered 1/6, 2017 at 15:51 Comment(0)
E
0

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.

Elsey answered 7/6, 2017 at 10:32 Comment(0)
C
0

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.

Capstone answered 18/1, 2018 at 21:50 Comment(0)
A
0

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

Andradite answered 25/1, 2018 at 16:59 Comment(0)
C
0

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

Countryman answered 31/5, 2018 at 1:16 Comment(0)
L
0

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.

Lithophyte answered 3/7, 2018 at 20:0 Comment(0)
C
0

Solved a similar issue by enabling USB debugging under developer settings in the emulator.

Counterproposal answered 30/8, 2023 at 13:33 Comment(0)
L
-1

Restarting the computer solved it for me.

Latoria answered 20/3, 2017 at 13:11 Comment(0)
J
-1

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

Jankowski answered 4/5, 2017 at 5:6 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.