How can I get more information about "Waiting for target device to come online" in Android Studio?
Asked Answered
H

3

5

I run Android Studio 2.3 on Ubuntu 16.10 without any devices attached. When selecting Run > Run 'app' to run the app inside an emulated device, I get to see the following notification but the target device never comes online.

enter image description here

If I run adb devices in the terminal, I get to see this:

enter image description here

My version of Android Studio:

enter image description here

Hardware answered 5/3, 2017 at 18:46 Comment(6)
Use adb devices in the terminalBurchfield
Thank you! Can you please see my edits?Hardware
Alright, so you have no devices attached? Are you using a phone, emulator, or just starting Android Studio, and it freezes?Burchfield
Exactly. No device attached. I try to run it inside an emulated device.Hardware
If the emulator is up and running, adb devices should show something. The fact that it doesn't is why you get the progress bar. I'm not sure how you'd address it other than restarting a few times or plugging in a physical deviceBurchfield
All of this didn't help. I will try to reinstall Android Studio.Hardware
T
16

Had the same problem this morning, same version on ubuntu and android studio, 2 ways i did which helped me, i recon the second method :

  1. Under the Android Virtual Device Manager, you can edit the configuration on the virtual device, fine the Emulated Performance, Set it to -> Software. (Bare in mind that this will make your emulator seems running slow while emulating any app).

  2. Second way is to locate lib64 folder since i am running ubuntu 64 bit. In my case, its located under ~/Android/Sdk/emulator/lib64. Then run the following commands in terminal :

//Double Check to see if these are available

$ sudo apt-get install lib64stdc++6:i386

$ sudo apt-get install mesa-utils

//Navigate to the ~/Android/Sdk/emulator/lib64 folder

$ mv libstdc++/ libstdc++.bak

$ ln -s /usr/lib64/libstdc++.so.6 libstdc++

Trite answered 8/3, 2017 at 15:10 Comment(2)
Awesome tips! Thanks :)Barbirolli
The last two lines fixed it for me (mv libstdc++/ libstdc++.bak && ln -s /usr/lib64/libstdc++.so.6 libstdc++) although I'm working on Ubuntu, so the lib name was actually /usr/lib/x86_64-linux-gnu/libstdc++.so.6Landlordism
V
3

I solved it with just modifying a configuration on AVD.

1) Go to the AVD Manager

2) Click "Edit this AVD" Button which seems like pencil.

3) Set the graphics as a software.

Vegetarianism answered 20/5, 2017 at 8:50 Comment(2)
I'm unable to change the setting, it defaults to automatic and is greyed out, how do I change it?Thallic
After trying all possible options like the cold boot, and wipe data, this solution worked for me.Hag
L
1

The solution showed above:
//Double Check to see if these are available

$ sudo apt-get install lib64stdc++6:i386

$ sudo apt-get install mesa-utils

//Navigate to the ~/Android/Sdk/emulator/lib64 folder

$ mv libstdc++/ libstdc++.bak

$ ln -s /usr/lib64/libstdc++.so.6 libstdc++

Should work for this errors:

libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
    Major opcode of failed request: 155 (GLX)
    Minor opcode of failed request: 6 (X_GLXIsDirect)
    Serial number of failed request: 55
    Current serial number in output stream: 54

Linnette answered 14/3, 2017 at 15:2 Comment(3)
How is your answer different from the above one?Hardware
There is no difference in it. I just tried to tell that one solution also applies to another error.Linnette
Maybe we can improve the existing answer above with your information?Hardware

© 2022 - 2024 — McMap. All rights reserved.