Reputation: 473
java.io.IOException: Cannot download , response: 200 OK Warning: An error occurred while preparing SDK package Android Support Repository: Cannot download , response: 200 OK. java.io.IOException: Cannot download 'https://dl.google.com/android/repository/emulator-windows-3833124.zip': dl.google.com Warning: An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-windows-3833124.zip': dl.google.com. java.io.IOException: Cannot download ' Warning: An error occurred while preparing SDK package Google Repository: Cannot download
Upvotes: 44
Views: 177136
Reputation: 1125
Same problem happened to me. After two days constant trying I solved the problem. I use internet from my mobile using JIO SIM. I just switched my alternate mobile for internet data where I am also using VODAFONE SIM. You just switch from your current internet to another internet even over WIFI. I see in some cases some websites does not work properly in Jio network otherwise I prefer this network(JIO) for its top-notch speed and services. If in your case whatever your data provider just try this method use other data provider or WIFI. If this method solves your problem just hit the like button so others can get help. Thanks
Upvotes: -1
Reputation: 427
Simply click on menu: File then click ->Invalidate caches
You may need to check optional if available
(clear file system cache and local history)
(clear vcs log cache and indexes)
Then click Invalidate and Restart.
This will solve your problem.
Thanks
Upvotes: -1
Reputation: 3619
I did not had android studio and was using only sdk manager. It was downloading to a location of <your path>\Android\.temp
Directory.
Deleted the broken .zip file and re-ran the flutter run
command.
Upvotes: 0
Reputation: 81
As mentioned in the earlier comments, the problem might be because of slow internet connection, just to add more details, you need to download all the problematic file which you get in the logs, in my case they were (emulator-windows_x<>.zip and x86-30_r09.zip) and place them in the respective sub-folders (PackageOperation02 or PackageOperation05 ..) present in .tmp folder located under andriod-sdk root folder and retrigger the sdk installation from Andriod studio.
What Andriod-Studio will do after your action: It will first search the files in .tmp folder if they exist it wont download and simply unzip and initiate the installation from where it failed.
Upvotes: 0
Reputation: 471
delete uncompleted download in "[Android SDK folder]\.downloadIntermediates". i solved my problem by this method.
Upvotes: 47
Reputation: 11
Very often the cause of errors can be an interruption of the Internet connection. Just resume downloading with stable Internet.
Upvotes: 1
Reputation: 1144
This amount of download requires high speed Internet and if you don't have this it may show this error.
Upvotes: 0
Reputation: 4067
Below steps fixed the problem for me -
1. Download zip file from this location
2. Extract it and move the emulator folder image for emulator folder into the SDK folder image for SDK folder
I hope it works for you as well, I was using Windows 10 Pro 64bit
Upvotes: 0
Reputation: 61
you can manual download sdk:
Unpack to
Parsing
Upvotes: 6
Reputation: 1145
Find Android SDK folder. (Usually C:\User\AppData\Local\Android\sdk
) Delete folders which starts with dot(.), they are temporary download files. Then delete Android Emulator from SDK Manager. Then run Android Studio as administrator and then download and install Android Emulator again. Now you can create emulator and use it without errors.
Upvotes: 2
Reputation: 57
I had a similar issue while installing in Mac Catalina:
java.net.SocketException: Operation timed out (Read failed) Warning: An error occurred while preparing SDK package Sources for Android 29: Operation timed out (Read failed).
First attempt using standard configuration - Failed
Second attempt using standard configuration - Failed
Third attempt using Customer configuration, I selected the android simulator - Failed
Fourth attempt using Customer configuration, I selected the android simulator - Successful!
Not sure what was the reason, there is no change in any setting other than the above (and I am an Administrator of the Mac).
Upvotes: 0
Reputation: 61
I have a similar problem.
And I notice some setting about Force https//... to be fetched using http://...
After using it, my download run normally:
Upvotes: 6
Reputation: 42
Hi I faced a similar issue... Turn's out that may be related to system configuration of your machine..
Try downloading latest packages as per your system configuration from below:
Upvotes: 0
Reputation: 1
I had the same problem, I downloaded problematic file 'https://dl.google.com/android/repository/emulator-windows-3833124.zip' and extracted it to C:\Users\$usrname$\AppData\Local\Android\sdk\extras\android. It solved the problem for me.
Upvotes: 0
Reputation: 62
I had Admin access on my Laptop, but still I faced this problem (also other packages were getting downloaded). I found of that the https://dl.google.com/android/repository/android_m2repository_r47.zip file is quiet large, and in my case since my network speed was slow and I was attempting to download a large file on a slow network I concluded that it was failing for timeout. I switched to a faster LAN and it got downloaded.
Upvotes: 0
Reputation: 29
run the studio.sh script with sudo:
"sudo ./studio.sh"
if that does not work run:
"sudo chmod 777 -R /opt"
without quotes should work
Upvotes: 2
Reputation: 11
As shown in the android SDK video ./studio.sh has to be run, however if run without sudo or su, this might give problems like these. So you should run with sudo or su as shown below:
or if you want to run as root
Hope this helps.
Upvotes: 0
Reputation:
I had this similar issue below worked for me. The solution for this is:
Run Android Studio as Administrator.
Re run the update.
It will work.
Upvotes: 79