【问题标题】:Failed to find Build Tools revision 25.0.0找不到构建工具修订版 25.0.0
【发布时间】:2021-07-31 14:42:03
【问题描述】:

我尝试将项目设置中的构建工具版本设置为 25.0.0。并且还要添加正确的应用插件语句(您会在屏幕截图中找到它)。我也尝试过将项目与 Gradle 文件同步,尽管我认为这个问题与此无关。

基本上确保它在那里。我还下载并更新了所需的 SDK。我会附上截图。

build.gradle 文件截图 https://i.stack.imgur.com/ardbH.png

项目结构设置 > 模块 https://i.stack.imgur.com/jRR09.png

SDK 信息 https://i.stack.imgur.com/1n4jr.png

Build.gradle 文件(项目级别)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:3.0.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

依赖关系

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.google.firebase:firebase-database:9.0.2'
    compile "com.google.firebase:firebase-auth:9.0.2"
    compile 'com.firebase:firebase-client-android:2.3.1'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

【问题讨论】:

  • 您能否将build.gradle 附加到project 级别。另外,请附上app级别build.gradle中的依赖项
  • 附上他们两个请检查 Mohit Ajwani
  • 请更新您的 gradle 插件。 com.android.tools.build:gradle:2.2.2 在项目级文件中。这是一个旧的,也许构建工具 25.0.0 不支持它。需要查看发行说明。我很确定最新版本超过 3.4.0。
  • 好的,非常感谢!
  • 问题解决了吗?如果是,我可以写一个答案,然后你可以接受。

标签: android android-studio gradle android-gradle-plugin android-build


【解决方案1】:

对于 android studio 中的 Failed to Find Build Tools Revision 25.0.0 错误,首先保存您的工作并关闭项目。

  • 打开 SDK 管理器并点击“SDK 工具”
  • 找到包 25.0.0 并检查包是否已安装。
  • Intsall 软件包或检查是否已安装其他版本的其他软件包并更改 build.gradle 中的 buildtoolversion

执行此步骤后再次运行程序即可。

如果问题再次出现,请尝试再次升级您的 buildtoolversion。

【讨论】:

  • 谢谢!虽然我遇到了一个新的错误,但这确实解决了以前的问题!非常感谢!
  • 我遇到过这个问题,所以我用这种方式解决了你的问题。
  • 很确定 buildtooolversion 不是一个实际的属性名称,你能仔细检查一下它的拼写吗?
【解决方案2】:

您可以在项目级别文件中更新您的 gradle 插件 com.android.tools.build:gradle:2.2.2。这是一个旧的,可能构建工具25.0.0 不支持它。需要查看发行说明。我很确定最新的不止3.4.0

【讨论】:

    猜你喜欢
    • 2020-12-22
    • 2016-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-10
    • 2015-12-15
    • 1970-01-01
    相关资源
    最近更新 更多