Error with SDK package download in Android Studio

后端 未结 15 718
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 17:45

java.io.IOException: Cannot download , response: 200 OK Warning: An error occurred while preparing SDK package Android Support Repository: Cannot downloa

相关标签:
15条回答
  • 2020-12-28 17:48

    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

    0 讨论(0)
  • 2020-12-28 17:55

    I had this similar issue below worked for me. The solution for this is:

    1. Run Android Studio as Administrator.

    2. Re run the update.

    It will work.

    0 讨论(0)
  • 2020-12-28 17:55

    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:

    • sudo ./studio.sh(or /path/to/studio.sh)

    or if you want to run as root

    • su
    • Password:root password
    • ./studio.sh or (or /path/to/studio.sh) This should fix the problem There might be a problem with /tmp if it is on a different partition and the partition has less space than needed to install

    Hope this helps.

    0 讨论(0)
  • 2020-12-28 17:57

    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.

    0 讨论(0)
  • 2020-12-28 17: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).

    0 讨论(0)
  • 2020-12-28 17:58

    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

    0 讨论(0)
提交回复
热议问题