“waiting for target device to come online” in Android Studio 2.3

匿名 (未验证) 提交于 2019-12-03 08:30:34

问题:

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:

And:

回答1:

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


UPDATE:

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



回答2:

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++


回答3:

if you docker is running you should close it.



回答4:

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"


回答5:

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



回答6:

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



回答7:

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.



回答8:

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.



回答9:

Restarting the computer solved it for me.



回答10:

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.



回答11:

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



回答12:

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



回答13:

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



回答14:

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

What fixed this was:

cd ~/.android/avd// rm *.img

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



回答15:

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.



回答16:

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.



回答17:

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



回答18:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!