首先,我已閱讀所有其他解決方案帖子,迄今爲止,還沒有人工作。 和我使用Android Studio中2.0Android Studio 2.0:未找到Gradle DSL方法:'classpath()'錯誤(27,0)
錯誤: 錯誤:(27,0)搖籃DSL方法未找到: '類路徑()' 可能的原因:
這裏的build.gradle(APP):
apply plugin: 'com.android.application'
android
{
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.kandarp.food"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
classpath 'com.google.gms:google-services:2.0.0-alpha6'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
}
apply plugin: 'com.google.gms.google-services'
這裏的build.gradle(頂層):
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'project-report'
apply plugin: 'application'
它會真的很棒,如果有人能指出什麼是錯誤
我對此一無所知性質的錯誤,但撇號(Sailu的食物)讓我的spidey感興奮... – GHC