Android studio Gradle sdl method not found ...

来源:互联网 发布:游戏攻略软件 编辑:程序博客网 时间:2024/05/16 11:14

git上导入项目,或者android中导入eclipse项目中,经常回出现apply plugin ,gradle sdl android method not found 错误,
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:1.2.3’
}
}
allprojects {
repositories {
jcenter()
}

android {    compileSdkVersion 21    buildToolsVersion "22.0.1"}dependencies {}

}
删除自动生成的
android {
compileSdkVersion 21
buildToolsVersion “22.0.1”
}

dependencies {}

build.gradle变成
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:1.2.3’
}
}
allprojects {
repositories {
jcenter()
}
}

同步一下即可~~

0 0