Android Studio 1.5啟動出現“SDK Manager: failed to install”問題的解決


問題描述

Android Studio 1.5是當前最新Android手機應用開發平台,下載bundle版安裝后,啟動Studio后出現“SDK Manager: failed to install”問題。詳細信息如下:

Android SDK was installed to C:\Users\jack\AppData\Local\Android\sdk

Installing Archives:
  Preparing to install archives
  Installing SDK Platform Android 6.0, API 23, revision 2
  Failed to rename directory C:\Users\jack\AppData\Local\Android\sdk\platforms\android-23 to C:\Users\jack\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\jack\AppData\Local\Android\sdk\platforms\android-23'.
When ready, press YES to try again.
Note: you  can use --force to override to yes.

問題分析

1,網上根據“SDK Manager: failed to install”關鍵詞查了一下,基本都是和以前老版本相關的,不得要領。

2,Studio本身的提示是關閉殺毒程序,其實和殺毒程序無關,仍不得要領。

3,其實問題現象很明顯,是C:\Users\jack\AppData\Local\Android\sdk\temp這個目錄不能寫入,查看此目錄,發現設置了“只讀”屬性。

問題解決

C:\Users\jack\AppData\Local\Android\sdk\temp這個目錄是Andriod Studio安裝程序自建的,安裝程序自己給自己挖了個坑,把SDK下的Temp目錄設為只讀,導致程序啟動更新SDK要寫入Temp目錄時出錯。

將Temp目錄的只讀屬性去掉,Android Studio重啟后SDK更新成功!

Android SDK was installed to C:\Users\jack\AppData\Local\Android\sdk

Installing Archives:
  Preparing to install archives
  Installing SDK Platform Android 6.0, API 23, revision 2
    Installed SDK Platform Android 6.0, API 23, revision 2
  Done. 1 package installed.
Android SDK is up to date.
Creating Android virtual device
Android virtual device Nexus_5_API_23_x86 was successfully created


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM