简体   繁体   English

未指定构建工具版本

[英]build tool version not specified

i have this prolem when i sync the project with the gradle files, Error:Cause: buildToolsVersion is not specified. 当我将项目与gradle文件同步时,我有这个问题,错误:原因:未指定buildToolsVersion。

this is the build.gradle project 这是build.gradle项目

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.example.natalia.ministerioproyecto"
        minSdkVersion 10
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    sourceSets
            {
                main
                        {
                            res.srcDirs =
                                    [
                                            '/src/main/res/layout/Polo azul/Formulario Dinara'
                                    ]
                        }
            }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    classpath 'com.android.support:appcompat-v7:23.4.0'
}

and thi is the module:app 这是模块:app

apply plugin:'com.android.application'

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.2'


        }
    }


    allprojects {
        repositories {
            jcenter()

        }
    }

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

Gradle files are wrong. Gradle文件错误。

build.gradle project build.gradle项目

 buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } 

module:app 模组:app

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.example.natalia.ministerioproyecto" minSdkVersion 10 targetSdkVersion 23 versionCode 1 versionName "1.0" } sourceSets { main { res.srcDirs = [ '/src/main/res/layout/Polo azul/Formulario Dinara' ] } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' classpath 'com.android.support:appcompat-v7:23.4.0' } 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM