Updating Android SDK: “A folder failed to be moved.”

前端 未结 25 1797
面向向阳花
面向向阳花 2020-12-07 10:29

While trying to update my Android SDK I am encountering this error when trying to install this particular package:

相关标签:
25条回答
  • 2020-12-07 11:04

    I had to make a copy of the tools folder itself (keeping it at the same directory tree level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder). Then ran Android.bat from that copy.

    After the update just delete the tools-copy folder.

    0 讨论(0)
  • 2020-12-07 11:08

    If you launched the SDK Manager from Android Studio then all you need to do is close Android Studio.

    I presumed the SDK Manager was a modal dialog that was part of Android Studio - not a separate program.

    0 讨论(0)
  • 2020-12-07 11:10

    Ensure you don't have any essential files or folder opened/being used by other applications including explorer.

    0 讨论(0)
  • 2020-12-07 11:10

    Solved this on my side by killing the adb.exe in Task Manager.

    0 讨论(0)
  • 2020-12-07 11:11

    This happens once in a while on my Windows SDK (even when I don't have any antivirus or similar programs running, execute the SDK-Manager as an administrator and so on).

    I just update the tools by hand in this case. Which means close the SDK-Manager after the error and open the ANDROID_SDK\temp folder. There should be a zip named tools_R16.zip or similar (don't remember the exact name). Unzip that. You should end up with a tools folder. Copy all the files from this folder into ANDROID_SDK\tools. Overwrite when asked. And take a backup of the SDKs tools folder beforehand, just in case something explodes.

    After that, start the SDK-Manager again. The tools version should be updated.

    0 讨论(0)
  • 2020-12-07 11:11

    The error message was Failed to rename directory C:\devtools\android-sdk\system-images\android-21\google_apis\x86 to C:\devtools\android-sdk\temp\SystemImagePackage.old01. I deleted the C:\devtools\android-sdk\temp\SystemImagePackage.old01 directory by hand (it was a leftover? I don't know) and it was able to proceed.

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