无法从build.gradle

时间:2015-08-30 07:34:45

标签: android build.gradle

我正在尝试从build.gradle更新构建工具版本并获得此Gradle Sync错误消息 : - 我juset去了app目录里面的build.gradle文件并更改了: buildToolsVersion' 20.0.1' to buildToolsVersion' 23.0.0'然后一切都出错了。

enter image description here

所以我查看了SDK管理器,但是那里安装了构建工具

enter image description here

我现在该怎么办?

1 个答案:

答案 0 :(得分:1)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'

    defaultConfig {
        applicationId "com.example.android.didyoufeelit"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    repositories {
        mavenLocal()
        mavenCentral()
        google()
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:27.1.1'
}

尝试将其更新到build.gradle