Android Studio 匯入項目 出現安裝Error:Cause: failed to find target with hash string 'android-23' 等錯誤,stringhashcode
今天 在匯入 一個新項目時 ; 出現了這個錯
Error:Cause: failed to find target with hash string 'android-23' in: C:\Users\Administrator\AppData\Local\Android\sdkOpen Android SDK Manager
一 、於是 點擊Open Android SDK Manager ; 想更新下android studio 下的 sdk ;
無奈出現了這個錯誤:
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.
二 、使用百度翻譯 哈哈:意思是。
載入SDK的資訊…
安裝檔案:
準備安裝檔案
安裝SDK平台Android 6,API 23,修訂2
無法重新命名目錄C:\使用者\管理員\ AppData \地方\ Android SDK \平台\ android-23 C:\使用者\管理員\ AppData \地方\ \溫度\ remoteplatformpkginfo.old01 Android SDK。
SDK管理器:安裝失敗
•警告!=—
無法移動檔案夾。在視窗中,這通常意味著一個程式是使用該檔案夾(例如視窗資源管理員或您的反病毒軟體)。
請暫時關閉你的殺毒軟體或者關閉所有正在啟動並執行程式,可以訪問目錄C:\使用者\管理員\ AppData \地方\ Android SDK平台android-23 \ \”。
準備好後,請按“是”再試。
註:你可以使用武力來替代是。
[和] =
完成. 沒有安裝。
在網上找了下方案
三 、解決方案:
C:\Users\Administrator\AppData\Local\Android\sdk\temp
這個目錄是Andriod Studio安裝程式自建的,安裝程式後把SDK下的Temp目錄設為唯讀
,導致程式啟動更新SDK要寫入Temp目錄時出錯。
將Temp目錄的唯讀屬性去掉, 右鍵此檔案,將唯讀勾選去掉即可!,
重啟Android Studio後 SDK就更新成功
然後 還是找不到
Error:Cause: failed to find target with hash string 'android-23' in: C:\Users\Administrator\AppData\Local\Android\sdkOpen Android SDK Manager再次重啟Android Studio 後 ,項目便可以正常使用了!(貌似感覺 ReBulid一下也行!)。