【问题标题】:No version of Android SDK Build-Tools installed未安装 Android SDK Build-Tools 版本
【发布时间】:2017-11-07 17:20:58
【问题描述】:

我的 Gradle 项目在 Android Studio 中同步失败,并显示以下错误:

Gradle project sync failed

Failed to find target with hash string 'android-26' in: C\Users\...

为了解决这个问题,我尝试安装 android API 26,但当我意识到没有安装任何版本的 Android SDK Build-Tools:

SDK Tools

尝试通过 SDK 管理器更新 Build-Tools 时出现以下错误:

要安装: - Android SDK 构建工具 27.0.1 (build-tools;27.0.1) 准备“安装 Android SDK Build-Tools 27.0.1(修订版:27.0.1)”。 失败的包: - Android SDK Build-Tools 27.0.1 (build-tools;27.0.1)

有人对如何解决这个问题有任何建议吗?

【问题讨论】:

  • 检查您的代理设置。
  • 现在设置为无代理,应该怎么做?
  • 为什么要先更新构建工具?您不必为了安装 android-26 平台而执行此操作。您提供的屏幕截图显示您已经拥有一些构建工具 - 只是不是最新版本。

标签: android android-studio android-sdk-tools build-tools


【解决方案1】:

您缺少平台android-26,它必须放在SDK 的子文件夹平台中。从 Google 存储库下载 android-26.zip 并将其解压缩到上述路径。清理并重建您的项目。

【讨论】:

    猜你喜欢
    • 2020-05-25
    • 1970-01-01
    • 2013-07-31
    • 1970-01-01
    • 2020-03-30
    • 1970-01-01
    • 1970-01-01
    • 2019-11-23
    • 1970-01-01
    相关资源
    最近更新 更多