android - 从 Android 应用程序编译 Gradle 时出错 : The SDK Build Tools revision (24. 0.3) 对于项目而言太低

标签 android android-gradle-plugin build.gradle android-studio-2.3

apply plugin: 'com.android.application'

android {
     compileSdkVersion 19
     buildToolsVersion '24.0.3'

defaultConfig {
    applicationId "com.android.projectz.teamrocket.thebusapp"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "0.7alpha-sa3cvc6"
    vectorDrawables.useSupportLibrary = true
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }



}



dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile files('libs/commons-net-3.5.jar')
    compile 'com.android.support:recyclerview-v7:24.2.1'
    compile 'com.android.support:cardview-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile 'com.github.paolorotolo:appintro:4.1.0'
    compile 'com.afollestad.material-dialogs:core:0.9.2.3'
    compile 'com.afollestad.material-dialogs:commons:0.9.1.0'
    compile 'com.getbase:floatingactionbutton:1.10.1'
    compile 'org.apache.commons:commons-io:1.3.2'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.android.gms:play-services:9.8.0'
    compile 'com.android.support:appcompat-v7:24.2.1'
    testCompile 'junit:junit:4.12'
}

这是来自“控制台”的错误:

Error:The SDK Build Tools revision (24.0.3) is too low for project ':app'. Minimum required is 25.0.0

我不知道为什么,我更新了我的 Android Studio(从 2.2 到 2.3),我也安装了所有需要的包,所有必要的包(SDK 和其他)。在我升级我的 Android Studio 之前,配置工作正常。

最佳答案

Error:The SDK Build Tools revision (24.0.3) is too low for project

更新 buildToolsVersion 25.0.2 但真正的问题在这里:

compileSdkVersion 19

由于您使用的是支持库 v24,因此您必须使用 API 24+ 进行编译

此外,强烈建议您始终使用最新的 SDK 进行编译。

关于android - 从 Android 应用程序编译 Gradle 时出错 : The SDK Build Tools revision (24. 0.3) 对于项目而言太低,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43098452/

相关文章:

java - 混合 Android View 和 GLSurfaceView

android - 在 Gradle 中针对不同风格编辑 google-services.json

android - 运行 connectedAndroidTest 并跳过卸载

android - Android gradle 中的 apt 依赖范围 - 它的用途是什么?

android - 为什么跳过 gradle war 任务?

android - Gradle依赖问题android

java - SQLite插入函数/方法参数参数太多,如何重构?

android:layout_centerHorizo​​ntal ="true"在 android 中不起作用

java - 将 SQLite DB 的一列获取到 ListView 在 Android 中不起作用

android - 在 Android/Gradle 中如何定义仅在构建特定 buildType/buildVariant/productFlavor (v0.10+) 时运行的任务