簡體   English   中英

無法從 SDK Manager 安裝“Android SDK Platform Tools”

[英]Unable to install “Android SDK Platform Tools” from SDK Manager

安裝過程中顯示以下錯誤:

Done loading packages.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 26.0.2
Download interrupted: Connection to https://dl.google.com refused
Done. Nothing was installed.
Preparing to install archives
Downloading Android SDK Platform-tools, revision 26.0.2
Download finished with wrong checksum. Expected 98832431e339c82be1fe910a733a3782071200fd, got aa3ef6f18eff4b8f12dbdf980647a6ce6c2ebe8c.
Done. Nothing was installed.

我必須自己安裝它。

  1. 下載鏈接:
    https://developer.android.com/studio/releases/platform-tools.html
  2. 選擇 zip 文件SDK Platform-Tools for Windows並解壓縮。
  3. 將其移動到您的 android 目錄中,在我的情況下是: C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\19.0\\CatalogRepository\\AndroidSDK-2433_19.0.27659.1188
  4. 現在您有了新目錄: C:\\Users\\Public\\Documents\\Embarcadero\\Studio\\19.0\\CatalogRepository\\AndroidSDK-2433_19.0.27659.1188\\platform-tools
  5. 再次運行SDK Manager.exe

就我而言,錯誤消失了。 我必須先安裝 4 個包,然后我必須安裝 3 個包。 現在它運行完美。

您可以提取 SDK Manager 已經下載的存檔:

  1. 轉到您的 android-sdk 目錄
  2. 進入“臨時”文件夾
  3. 將“platform-tools_r26.0.2-windows.zip”解壓到android-sdk根目錄

但這使得校驗和毫無意義,除非您現在需要新版本,否則最好等到它被修復。

我通過首先使用 Android SDK 管理器刪除 Android SDK 平台工具解決了這個問題。 然后我使用上面 Umair Malhi 提供的直接下載鏈接( https://dl.google.com/android/repository/platform-tools_r26.0.2-windows.zip )然后將 platform-tools 文件夾解壓到 SDK 文件夾中(其中在我的情況下是 C:\\ProgramData\\Microsoft\\AndroidSDK\\25)。 如果您重新運行 Android SDK Manager,問題就解決了。

我遇到了同樣的問題,在以管理員身份運行 Visual Studio 后,更新成功完成。

編輯:當您單擊 Android SDK 平台工具時,較新版本的 VS 現在會提示您在管理員模式下運行 VS。

我有同樣的校驗和問題,直到我剛剛更新到 Android Studio 3.0。 現在 Android SDK Platform-tools 26.0.2 按預期下載並安裝。 不確定 Android Studio 2.x 是否仍然存在該問題,或者是否已單獨修復,但現在值得再試一次。

在我的情況下,我需要做的就是以管理員身份運行 Android Studio,並且安裝的軟件包沒有問題。

我有同樣的問題,就我而言,我沒有將規則寫入platform-tools文件夾。 所以我給了我寫規則的命令:

sudo chmod -R ugo+rw

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM