0

I have run into a bit of a problem with my emulator for android studio. Everything was running fine yesterday until I was notified about updates and installed them. All but the emulator installed and now the emulator would not load. I am given the message: Error while waiting for device: Timed out after 300seconds waiting for emulator to come online. I went into SDK tools and tried to reinstall but I have gotten this message.

To install:
- Android Emulator (emulator)
Preparing "Install Android Emulator (revision: 26.1.4)".
Found existing prepared package.
"Install Android Emulator (revision: 26.1.4)" ready.
Finishing "Install Android Emulator (revision: 26.1.4)"
Installing Android Emulator in             
C:\Users\under\AppData\Local\Android\Sdk\emulator
An error occurred during installation: Failed to move away or delete 
existing target file: C:\Users\under\AppData\Local\Android\Sdk\emulator
Move it away manually and try again..
"Install Android Emulator (revision: 26.1.4)" complete.
"Install Android Emulator (revision: 26.1.4)" failed.
Failed packages:
- Android Emulator (emulator)

I would like to manually move the file so the emulator can finish but I don't know how exactly. This probably won't solve the issue but I would like to check it off the list of possible areas. I have also tried other methods of solving the issue but I will gladly double back to make sure that isn't a issue. Thanks in advance.

Roebo
  • 21
  • 1
  • 8
  • Update: After some uninstalling/reinstalling, I am still at square one. I go to SDK Tools and see that emulator is not installed and try to install it to get the previous message of unable to move target file. I have looked at multiple threads and I am convinced that the new updates caused the problem. Are there any other suggestions? – Roebo Sep 29 '17 at 09:40

4 Answers4

2

Experienced same issue.

I cut-pasted entire emulator folder (AppData\Local\Android\Sdk\emulator) to an alternative temporary(*) location.

After that I was able to complete the Android Emulator install successfully since no existing target with same name existed in that location (AppData\Local\Android\sdk) anymore. - - (*)Don't forget to delete the old emulator folder from the alternative location afterwards.

Mercuriat
  • 421
  • 3
  • 4
1

I found the issue. After uninstalling/reinstalling I had gotten the emulator to work. After some tinkering I noticed that I can update everything but the Intel x86 xham installer. In my case, doing so will give me a error message saying it cannot update while also uninstalling the version that was preinstalled which leads to the emulator not working. I did it twice to confirm.

Roebo
  • 21
  • 1
  • 8
0
  1. You might wanna check this out. Error while waiting for device: Timed out after 300seconds waiting for emulator to come online

  2. Navigate to your sdk folder, click on the platform-tools and you'll see your adb.exe file. Hold the Shift key down and right click and from the dialog box it brings, click Open Command Line.

    Run the following commands in your cmd or terminal:

    1. adb kill-server.
    2. adb start-server Then go back and start your emulator.

Hope this helps.

  • Is the SDK folder = SDK Manager? Or do I have to find it elsewhere? – Roebo Sep 28 '17 at 19:23
  • No, different from SDK manager. You should be able to find it in this location on your computer. C:\Users\[user]\AppData\Local\Android\sdk\platform-tools – Olaoye Oluwapelumi Sep 28 '17 at 19:30
  • Yes I did look at that thread for a couple of hours yesterday but I am doing some uninstalling/reinstalling as suggested on the other thread thanks. – Roebo Sep 28 '17 at 19:35
0

Just use another folder. For example: D:/AndroidStudioSdk or C:/sdk. No spaces and symbols like !, ?, #, $.

Pyjava
  • 1
  • 1