如何在 Android Studio 中更改构建工具版本 [英] How to change build tools version in Android Studio

查看:69
本文介绍了如何在 Android Studio 中更改构建工具版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 jfeinstein10 滑动菜单

我将库添加到我的根项目文件夹中.但我收到此错误:

I added the library into my root project folder. But I get this error :

错误:SDK 构建工具修订版 (17.0.0) 对项目来说太低':滑动菜单'.最低要求是 19.1.0

Error:The SDK Build Tools revision (17.0.0) is too low for project ':SlidingMenu'. Minimum required is 19.1.0

但我已经在使用19.1.0"但它仍然说我在使用 17.0.0

But I'm already using "19.1.0" but it still says I'm using 17.0.0

这是我的 build.gradle

Here is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.repliklernet.replikler"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile group:'com.squareup.picasso', name:'picasso', version:'2.5.0'
    compile project(':SlidingMenu')
}

我错过了什么?

推荐答案

如果查看库的 build.gradle 文件,可以看到它引用了构建工具 17:https://github.com/jfeinstein10/SlidingMenu/blob/master/library/build.gradle#L17

If you look at the build.gradle file for the library, you can see that it references build tools 17: https://github.com/jfeinstein10/SlidingMenu/blob/master/library/build.gradle#L17

您需要更新该行.

该错误实际上是通过提及project ':SlidingMenu' 来提示您,指的是项目SlidingMenu.

The error is actually giving you a hint by mentioning project ':SlidingMenu', referring to the project SlidingMenu.

这篇关于如何在 Android Studio 中更改构建工具版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆