java.io.IOException: Cannot download , response: 200 OK Warning: An error occurred while preparing SDK package Android Support Repository: Cannot downloa
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:
https://developer.android.com/studio/?gclid=Cj0KCQjwj9LkBRDnARIsAGQ-hUfGD0_yGXcqqZBN6d1Y-nMZ-TNKZtvdRBHimcE8m0tPYjyUw_bV77AaAsdzEALw_wcB
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.
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.
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.
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).
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