Android gradle build Error:(9, 0) Gradle DSL method not found: 'compile()'. -
i getting next build error when seek , sync project:
error:(9, 0) gradle dsl method not found: 'compile()' possible causes:the project 'alextest' may using version of gradle not contain method. build file may missing gradle plugin. link: apply gradle plugin
i have tried applying every single gradle plugin link me in link on bottom, yet same issue, conclude first error cause.
here build.gradle file alextest (the project directory):
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.13.2' compile 'com.google.android.gms:play-services:6.1.11' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }
i think gradle file having problem with. i'm not sure method referring to.
also here gradle-wrapper.properties referred to:
#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
perhaps gradle version in distributionurl needs match 1 in dependency?
i have build.gradle file in app directory - 1 level lower, though don't think referring to, here is:
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.+' }
i have tried applying every single gradle plugin link me in link on bottom, yet same issue, conclude first error cause.
correct.
here build.gradle file alextest (the project directory):
you notice file contains code comment:
// note: not place application dependencies here; belong // in individual module build.gradle files
remove compile 'com.google.android.gms:play-services:6.1.11'
line file. leave compile 'com.google.android.gms:play-services:6.1.+'
have in other build.gradle
file.
the dependencies
closure in buildscript
gradle plugins only. top-level dependencies
closure, found in module's build.gradle
file, application dependencies.
android build gradle
No comments:
Post a Comment