當我想將新庫添加到build.gradle文件時,它會生成一個錯誤。 這是我的build.gradle文件:在Android Studio中添加依賴項時出錯
// 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()
}
}
,這是錯誤
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
很好的解釋。謝謝 – Fakher