i have looked @ other related none seems solve problem in gradle.
here build gradle (module app )
apply plugin: 'com.android.application' android { compilesdkversion 21 buildtoolsversion "21.1.2" defaultconfig { applicationid "com.example.abdul_000.project" minsdkversion 9 targetsdkversion 21 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile files('libs/android-support-v13.jar') compile 'com.android.support:appcompat-v7:22.0.0' } // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.0.0' // note: not place application dependencies here; belong // in individual module build.gradle files } dependencies { compile 'com.android.support:support-v4:19.0.0' compile filetree(dir: 'libs', include: ['*.jar']) } apply plugin: 'application' allprojects { repositories { jcenter() } } }
the gives me "error:(20, 0) gradle dsl method not found: 'compile()' possible causes:the project 'project' may using version of gradle not contain method.
open gradle wrapper file build file may missing gradle plugin. apply gradle plugin"
what doing wrong ?
you cannot add compile dependencies global build.gradle
file. removing second dependencies block in global build.gradle
file fix error.
Comments
Post a Comment