【问题标题】:Error compiling Gradle from Android application: The SDK Build Tools revision (24.0.3) is too low for project从 Android 应用程序编译 Gradle 时出错:SDK 构建工具修订版 (24.0.3) 对项目而言太低
【发布时间】:2017-03-31 15:30:54
【问题描述】:
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 之前,配置运行良好。

【问题讨论】:

  • 为什么不更新 buildtoolversion 到 25.0.0?
  • 更好到最新的25.0.2
  • 我不想更新构建工具,因为我收到样式组件和其他组件的错误错误是那些:i68.tinypic.com/67rrx3.png
  • 构建工具与样式无关。 compileSdkVersion 可能有。
  • 好的,我尝试设置最新版本的 Gradle 和 buildTools,但我在 app/build/intermediates/res/merged/debug/values-v24/values-v24.xml 上遇到了一些问题错误:(3) 检索项目的父项时出错:找不到与给定名称“android:TextAppearance.Material.Widget.Button.Borderless.Colored”匹配的资源。

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


【解决方案1】:

错误:SDK Build Tools 版本 (24.0.3) 对于项目来说太低了

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

compileSdkVersion 19

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

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

【讨论】:

  • 好的,我更改了 compileSdkVersion 并且它工作正常。感恩节
  • @SimoneDalMas 如果它解决了您的问题,请标记答案。它可能对其他用户有用。
猜你喜欢
  • 2014-12-01
  • 1970-01-01
  • 2015-09-23
  • 1970-01-01
  • 2018-12-25
  • 1970-01-01
  • 2013-11-07
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多