When i want to add a new library to the build.gradle file it generate an error. this is my build.gradle file:
// 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.0.0'
compile 'com.mcxiaoke.volley:library:1.0.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
and this is the error
C:\Users\Fakher\Documents\Play_Store_WS\VolleyJson\build.gradle Error:Error:line (10)Gradle DSL method not found: 'compile()' Possible causes:
The project 'VolleyJson' may be using a version of Gradle that does not contain the method. Gradle settings The build file may be missing a Gradle plugin. Apply Gradle plugin