Faizaan Gagan
Faizaan Gagan

Reputation: 752

Installing Android Emulator In Android Studio with zip files

I wasn't able to install an emulator to my android studio installation. So, I copied this link from the studio and downloaded the zip file. Now I need help on how to manually install it using the zip files I downloaded.

https://dl.google.com/android/repository/sys-img/android/x86_64-25_r03.zip

Upvotes: 23

Views: 34925

Answers (8)

Victor Akande
Victor Akande

Reputation: 1

This might be rather late since its 2024, the Latest version "LadyBug" I had the same error and downloaded it manually, on extraction it wasn't detected, but after moving the main folder to my root directory and reinstalling android studio from the installer, I followed one of the procedures above with the "package.xml" and it worked I'm on windows 10 pro so I hope it works for others

Upvotes: 0

HilaryN
HilaryN

Reputation: 113

I'm on Android Studio 3.5.3, Windows 10. After emulator update 29.3.4, I also got a similar error to above when trying to install emulators (I tried Pixel 3 and 2):

*Packages to install: 
    - Google Play Intel x86 Atom_64 System Image (system-images;android-28;google_apis_playstore;x86_64)
    Preparing "Install Google Play Intel x86 Atom_64 System Image (revision: 8)".
    Downloading https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-28_r08.zip
    An error occurred while preparing SDK package Google Play Intel x86 Atom_64 System Image: Cannot download 'https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86_64-28_r08.zip': Read timed out
, response: 200 OK.
    "Install Google Play Intel x86 Atom_64 System Image (revision: 8)" failed.
    Failed packages:
    Google Play Intel x86 Atom_64 System Image (system-images;android-28;google_apis_playstore;x86_64)*

Running Android Studio as Administrator solved the problem for me.

Upvotes: 0

Christopher Kaggwa
Christopher Kaggwa

Reputation: 11

I have also had the same error of the emulator failing to install from android studio. I tried downloading the zip and extract it in the SDK as per the top solutions It also didnt work. I just fixed it by allowing android studio through windows firewall and controlled folder access now it downloaded successfully in android studio

Upvotes: 0

kodliber
kodliber

Reputation: 89

I think francis-bacon solution is right (I don't see why you would install the emulator in a system image folder as faizann-gagan wrote) but it is partial: you may have noticed that many components of the SDK has a package.xml file. Platforms, docs, tools... Without this file, the SDK manager will show the component as missing as long as it is not present.

Problem is, when you unzip the emulator package, you won't find a package.xml. (I guess it is added by the SDK manager upon installation completion)

I could get a copy of this file from a backup and modified the version number to match the one in source.properties (at the time of writing, 29.0.11) An old package.xml can be found at https://chromium.googlesource.com/android_tools/+/refs/heads/master/sdk/emulator/package.xml also.

Confirmed working on Mac OS High Sierra and Windows 8.1

Upvotes: 8

uneviltoo
uneviltoo

Reputation: 21

The Answer works as well, if you have only 4Gig of swap memory available and AVD unzips into [/tmp] untill it's full, leaving it that way after throwing an out of disk space error.

So, one need to have at least (3.2+0.75) ~= 4Gig of real free virtual memory to install via AVD.

I stress this only, because I did a distro upgrade after that (...), and it rendered the system unbootable.

Upvotes: 0

Francis Bacon
Francis Bacon

Reputation: 4745

When I launch the avd, I got the following error:

Emulator: Could not launch '/Users/gongzelong/Downloads/sdk/emulator/qemu/darwin-x86_64/qemu-system-i386': No such file or directory

I entered SDK-> Android Emulator in Android studio, and try to download Android Emulator.

But I got the following error when downloading it.

To install: - Android Emulator (emulator) Preparing "Install Android Emulator (revision: 27.3.9)". Downloading https://dl.google.com/android/repository/emulator-darwin-4899998.zip An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-darwin-4899998.zip': /var/folders/gf/hgd91n6x5v73ct9dvhr379500000gn/T/PackageOperation02/emulator-darwin-4899998.zip (No such file or directory) , response: 200 OK. "Install Android Emulator (revision: 27.3.9)" failed. Failed packages: - Android Emulator (emulator)

Here is how I solve the problem.

I downloaded the file https://dl.google.com/android/repository/emulator-darwin-4899998.zip from Chrome and unzip the zip and got the directory 'emulator'

zip and extracted directory emulater

Then I copy the emulator under sdk

location in location

And then launch the AVD in Android studio, and everything works well.

Upvotes: 2

Stefano Mtangoo
Stefano Mtangoo

Reputation: 6550

So I faced almost similar error today but it was about updating the emulator itself. Cause was the folder Android tried to download the file needed root permissions to access it. So here is what I did:

  1. Downloaded the file in the directory accessible curl https://dl.google.com/android/repository/emulator-darwin-4899998.zip -o emulator-darwin-4899998.zip
  2. Create the path as root user sudo mkdir -p /var/folders/8t/kf42z0w94278zwm6x_wzll7c0000gp/T/PackageOperation03/
  3. Make it writable by everyone sudo chmod -Rfv 777 /var/folders/8t/kf42z0w94278zwm6x_wzll7c0000gp/T/PackageOperation03/ /var/folders/8t/kf42z0w94278zwm6x_wzll7c0000gp/T/PackageOperation03/
  4. Move the downloaded file to the path mv emulator-darwin-4899998.zip /var/folders/8t/kf42z0w94278zwm6x_wzll7c0000gp/T/PackageOperation03/
  5. Finally run Android Studio update check and let it update. It will check existing file and use that one to update instead of re-downloading

Upvotes: 1

Faizaan Gagan
Faizaan Gagan

Reputation: 752

I had a problem downloading the Emulator(Image files) from the android studio. So when you try to run your app witout an emulator. It asks for an option to create a new emulator wherin it'll download the required files. It use to download 60-70% and give error. So I used the link in the download dialogbox, and manually downloaded the zip file. Now that zip file needs to be extracted and has to be pasted in the sdk folder.

sdk/system-images/android-(api level)/(extracted folder)

Note:This is my first thread so You might suggest some improvements

Upvotes: 32

Related Questions