Android Studio import project installation Error: Cause: failed to find target with hash string 'android-23' and other errors, stringhashcode
This error occurs when importing a new project today.
Error:Cause: failed to find target with hash string 'android-23' in: C:\Users\Administrator\AppData\Local\Android\sdkOpen Android SDK Manager
1. Click Open Android SDK Manager and update the sdk under android studio;
However, this error occurs:
Loading SDK information...
Installing Archives:
Preparing to install archives
Installing SDK Platform Android 6.0, API 23, revision 2
Failed to rename directory C: \ Users \ Administrator \ AppData \ Local \ Android \ sdk \ platforms \ android-23 to C: \ Users \ Administrator \ AppData \ Local \ Android \ sdk \ temp \ RemotePlatformPkgInfo. old01.
SDK Manager: failed to install
-= Warning! =-
A folder failed to be moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software .)
Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'C: \ Users \ Administrator \ AppData \ Local \ Android \ sdk \ platforms \ android-23 '.
When ready, press YES to try again.
Note: you can use -- force to override to yes.
[Y/n] =>
Done. Nothing was installed.
2. Use Baidu translation haha.
Loading SDK information...
Installation files:
Prepare installation files
Install SDK Android 6, API 23, revision 2
The directory C: \ User \ Administrator \ AppData \ Local \ Android SDK \ platform \ android-23 C: \ User \ Administrator \ AppData \ Local \ Temperature \ remoteplatformpkginfo cannot be renamed. old01 Android SDK.
Sdk manager: Installation failed
• Warning! =-
The folder cannot be moved. In a window, this usually means that a program uses this folder (such as window resource manager or your anti-virus software ).
Temporarily disable your antivirus software or close all running programs. You can access the C: \ User \ Administrator \ AppData \ Local \ Android SDK platform android-23 \ "directory \\".
After preparing, press "yes" and try again.
Note: You can use force to replace yes.
[And] =
Finished. No installation.
I found a solution online
Iii. solution:
C: \ Users \ Administrator \ AppData \ Local \ Android \ sdk \ temp
This directory is self-built by the Andriod Studio Installer. After installing the program, set the Temp directory under the SDK to read-only.
, Causing an error when the program starts updating the SDK to write data to the Temp directory.
Remove the read-only attribute of the Temp directory, right-click the file, and select "read-only !,
After you restart Android Studio, the SDK is updated successfully.
And cannot be found.
Error: Cause: failed to find target with hash string 'android-23' in: C: \ Users \ Administrator \ AppData \ Local \ Android \ sdkOpen Android SDK Manager restarts Android Studio again, and the project can be used normally! (It seems like ReBulid is okay !).