Ben denemek ve Projemi senkronize ederken şu yapı hatası alıyorum: Onların altındaki o bağlantıdaki beni bağlamak her gradle Eklenti uygulamasını denediAndroid platform yapısı Hata: (9, 0) Gradle DSL yöntemi bulunamadı: 'compile()'.
Error:(9, 0) Gradle DSL method not found: 'compile()'
Possible causes:The project 'AlexTest' may be using a version of Gradle that does not contain the method.
The build file may be missing a Gradle plugin.
link: Apply Gradle plugin
, henüz aynı sorunu, bu yüzden sonuçlandırmak ilk hatanın nedeni.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.2'
compile 'com.google.android.gms:play-services:6.1.11'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Size öyle sıkıntı çektiğim gradle dosya olduğunu düşünüyorum: Burada
AlexTest için build.gradle dosyası (proje dizini) 'dir. Ama hangi yöntemin başvurduğundan emin değilim.
#Mon Nov 10 01:06:12 PST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
belki distributionUrl içinde gradle versiyon bağımlılığında biriyle eşleşmesi gerekir:
Ayrıca burada da anılır gradle-wrapper.properties nedir?
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.snappiesticker.alextest"
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.1.+'
}
[Desteklenmeyen Gradle DSL yönteminin şu olası kopyası: 'compile()'!] (Http://stackoverflow.com/questions/24730117/unsupported-gradle-dsl-method-found-compile) – naXa