Android 未找到Gradle DSL方法:';buildToolsVersion()和#x27;

Android 未找到Gradle DSL方法:';buildToolsVersion()和#x27;,android,facebook,Android,Facebook,我是安卓工作室的新手 我已经导入了facebook和另一个第三方sdk 但我有以下错误 Error:(16, 0) Gradle DSL method not found: 'buildToolsVersion()' Possible causes:The project 'EmojiShare' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file, The bui

我是安卓工作室的新手

我已经导入了facebook和另一个第三方sdk

但我有以下错误

Error:(16, 0) Gradle DSL method not found: 'buildToolsVersion()'
Possible causes:The project 'EmojiShare' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file, The build file may be missing a Gradle plugin.
Apply Gradle plugin

我的build.gradle文件的代码如下

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
在app/build.gradle中,代码是

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc2"

    defaultConfig {
        applicationId "emoji.drcsystems.com.emojishare"
        minSdkVersion 22
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {

        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':EmojiconApp')

}

请发布您的
build.gradle
文件。一个是在项目的顶层;一个在
app
模块中。您好@commonware非常感谢您回复我,我已经更新了我的问题,请检查一下out@SiddhpuraAmit请同时发布@commonware(位于
应用程序
模块中)描述的另一个版本。@commonware如果我删除了facebook并再次导入,那么我会收到以下错误:(17,0)在项目中找不到属性“ANDROID\u BUILD\u TOOLS\u VERSION”:facebooklib。您所拥有的似乎很好,但我不会将
23.0.0 rc2
用于插件的版本
1.2.3
。使用
22.0.1
或更早版本。