2016-03-13 110 views
3

我今天在兩臺PC計算機上安裝了兩次Android Studio(版本1.5.1,版本爲141.2456560),現在我已經看到這個錯誤兩次了。換句話說,兩臺計算機上都出現相同的錯誤,這兩臺計算機都運行Windows 10 Pro(x64,版本1511,版本10586.164)。Android Studio安裝程序:android-23未安裝

以下SDK組件未安裝:Android的23

error

問題是什麼?我該如何解決這個問題?

回答

4

這可能是由Android Studio安裝腳本中的問題引起的。這也可能是由於缺乏管理員權限造成的。

點擊再試一次!這有助於我遇到此錯誤。

安裝日誌可能看起來像這樣。

Android SDK was installed to C:\Users\Bob\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\Bob\AppData\Local\Android\sdk\platforms\android-23 to C:\Users\Bob\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\Bob\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] => 
    Installing Android SDK Build-tools, revision 23.0.2 
    Installed Android SDK Build-tools, revision 23.0.2 
    Installing Local Maven repository for Support Libraries, revision 28 
    Installed Local Maven repository for Support Libraries, revision 28 
    Installing Google Repository, revision 24 
    Installed Google Repository, revision 24 
    Installing Android SDK Platform-tools, revision 23.1.0 
    Stopping ADB server succeeded. 
    Installed Android SDK Platform-tools, revision 23.1.0 
    Installing Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12 
    Installed Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12 
    Stopping ADB server succeeded. 
    Starting ADB server succeeded. 
    Done. 5 packages installed. 


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 

注意設置如何未能從目錄重命名:

C:\Users\Bob\AppData\Local\Android\sdk\platforms\android-23

到:

C:\Users\Bob\AppData\Local\Android\sdk\temp\RemotePlatformPkgInfo.old01

這可能是問題的原因。

在Windows上,這通常意味着一個程序正在使用該文件夾 (例如Windows資源管理器或您的防病毒軟件。)

「方案」可能是Android的工作室設置本身!在這種情況下,Android Studio安裝程序做錯了,但指責其他程序這樣做。

這也可能意味着Android Studio安裝程序在嘗試重命名或移動AppData中的文件夾時沒有管理員權限。因此,右鍵單擊Android Studio安裝EXE文件並選擇以管理員身份運行可能有助於避免此錯誤。

或!它可能已經嘗試超越自己,並以錯誤的順序進行,即在仍然坐在樹上時切割樹枝!

在我的情況下,點擊重試已足夠。這可以通過日誌看到。

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. 

完成設置後,無論有無錯誤,您都可以運行SDK管理器來查看是否安裝了「android-23」組件。啓動Android Studio,點擊快速啓動菜單中的配置按鈕,然後點擊SDK管理器。然後導航至外觀&行爲,系統設置,Android SDK。選中「顯示軟件包詳細信息」框,並確保所選的所有API級別23軟件包的狀態爲「已安裝」。您可以這種方式卸載,安裝,重新安裝和更新軟件包。

android sdk manager

0

在我的情況:我 只需再次執行以管理員身份運行.exe文件。 並按照進一步的步驟 - > 轉到設置 - >其他設置 - >隱私:檢查未知來源選項。 最後進入設置 - >其他設置 - >開發人員選項:選中通過USB安裝選項。

相關問題