Reputation: 71
i can't update the sdk tools, i don't know why, if use this command "sdkmanager --update" or "android update sdk" it will give me error like this title :
Warning: An error occured during installation: Failed to move away or delete existing target file: C:\androidSDK\sdk\tools
big thanks if you can help me!
Upvotes: 4
Views: 5402
Reputation: 1245
Ок, maybe this will save someone some time and nerves.
I Just closed Android Studio and opened again via Run as administrator
and retried update and this time it was successful without any errors.
Upvotes: 0
Reputation: 37
1) Rename C:\Users\%username%\AppData\Local\Android\Sdk\tools
folder to tool
2) Navigate to cd C:\Users\%username%\AppData\Local\Android\Sdk\tool\bin
in cmd
3) And run sdkmanager --update --verbose
, will create a new folder tools
4) Run flutter doctor --android-licenses
5) Then Accept the android licenses by clicking y
6) flutter doctor
command will show the following:
Kishore Kumar@Kishore MINGW64 ~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 25.0.2)
[√] Android Studio (version 3.1)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected devices (1 available)
• No issues found!
Upvotes: 4
Reputation: 81
Here is how i solved this problem:
First, I renamed AndroidSDK\tools
to AndroidSDK\tool
.
Then, I set the windows' environment variable Path from AndroidSDK\tools
to AndroidSDK\tool
(maybe not necessary)
Run sdkmanager --update
in tool\bin
.
Ignore the warning and wait until the update is done.
There will be a new folder named tools in AndroidSDK
.
Copy all the files in tools folder and paste them to tool folder.
Overlay all the files that which has the same name in tool folder.
Finally,delete tools folder and rename tool to tools.
Problem solved.
Upvotes: 4