5

This question is already many times asked but nothing its like my problem. I don't get it why its not booting up or starting my apk.

Its stucks right there

Its stuck right there. Nothing is happening just the waiting for target device respond is coming up.

Everything worked perfectly until now.

I even reinstalled it. Didn't help much

PC SPECS: i7 Core 2.2 GHZ 16GB RAM Intel Iris Pro 1500MB

Android Studio 2.3

Error while waiting for device: Timed out after 300seconds waiting for emulator to come online.

Still the same error.....

JCD
  • 155
  • 1
  • 15
  • setting the Graphics option on the Android Virtual Device to Software instead of Automatic or Hardware. – John Joe Mar 10 '17 at 08:18
  • @JohnJoe tried that already – JCD Mar 10 '17 at 08:18
  • @JCD - what happens when you start the Android Emulator from the Android Studio AVD Manager first and have it running and then build your app? – Jamal Eason Mar 10 '17 at 09:18
  • @JamalEason It's nothing happening. Thats the problem. It won't even show the emulator – JCD Mar 10 '17 at 09:50
  • @JCD - to debug this, go to the command line and go to the path of your Android SDK and try these commands: _$ cd [path to Android SDK]/emulator/_ and then run _$ ./emulator -list-avds_ identify the AVD you created, then run _$ ./emulator -avd [name of the avd]_ and look for the output of the emulator. What do you see? – Jamal Eason Mar 10 '17 at 11:04

8 Answers8

3

I got it to work with changing the auto graphics to software!

JCD
  • 155
  • 1
  • 15
2

I ran the commands that Jamal Eason recommended in the comments:

$ cd Android/Sdk/emulator
$ ./emulator -list-avds
$ ./emulator -avd [AVD_NAME]

I got some libGL error: unable to load driver: i965_dri.so errors when trying to run the AVD.

I was able to find this thread, where a user was able to fix a very similar issue by renaming the libstdc++.so.6 inside the emulator directory and linking the libstdc++.so.6 from the /usr/ directory.

$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6 /home/user/Android/Sdk/emulator/lib64/libstdc++
Vishnu M.
  • 971
  • 1
  • 10
  • 18
1

I wasted some time with the same problem, for me after all, the solution was to power off my vagrant machine, this means that if you have a virtual machine running, is not allowing the AVD to run. So if that's the case, just power off the VM's and try again.

Hope this helps :).

1

I was experiencing the same exact issue, so I ran the commands suggested by Jamal Eason, and I got the following error.

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

Did some looking around and found that actually my ANDROID_HOME environment variable was pointing to the incorrect location. So I added the following commands to my ~/.bash_profile to update the ANDROID_HOME variable to point to my Android directory, which for me looked like the following.

export ANDROID_HOME=/Users/{USER_NAME}/.android/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

See this Stack Overflow post for more information on updating the environment variable.

After that, I restarted Android Studio and was able to run my emulator as normal.

Community
  • 1
  • 1
Dlad
  • 11
  • 3
1

Free more space on your disk. The problem may be related to the space left on your hard disk.

0

try to use another emulator like Genymotion or BlueStacks and run it manually before runnig your app

  • Thanks for the answer. Got that already many times but I just need it with the Android Studio Emulator – JCD Mar 10 '17 at 08:23
0

I had this issue after manually moving Android SDK to another disk to save disk space on C:\ and improperly setting ANDROID_SDK_HOME.

I set ANDROID_SDK_HOME to d:\stuff\android\.android\ whereas it should have been d:\stuff\android\.

Apart from that, since Android machinery was creating another .android inside .android so I moved its contents one folder up.

jakub.g
  • 38,512
  • 12
  • 92
  • 130
0

Only running emulators that were x86 worked for me.

(I also edited the emulator settings for that device and selected "automatic" for graphics driver and selected a device as it appeared to be uninitialised).

Also check out the obvious: Google's page on it

noelicus
  • 14,468
  • 3
  • 92
  • 111