没有找到DSL的gradle方法:“编译()'坚持错误 [英] gradle DSL method not found: 'compile()' persisting error
问题描述
这是我的gradle这个文件看起来像的http://$c$cshare.io/RWMpl ,它抛出一个小错误说:
This is what my gradle file looks like http://codeshare.io/RWMpl , its throwing a small error saying:
DSL的gradle方法:编译()
gradle DSL method not found: 'compile()' .
My 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.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'org.ektorp:org.ektorp:1.4.2'
}
allprojects {
repositories {
jcenter()
}
}
我也跟着上的 <一的建议href=\"http://stackoverflow.com/questions/27156428/getting-error-gradle-dsl-method-not-found-compile-when-syncing-build-grad\">THIS螺纹(见接受的答案),但我仍然得到以下错误:
I followed the advice on THIS thread(see the accepted answer) , but i still get the following error:
DSL的gradle方法:编译()
gradle DSL method not found: 'compile()'.
为什么呢?
推荐答案
您使用的Gradle错误文件。检查的build.gradle(模块:yourmodulename)。
,这是你必须更新
You using a wrong gradle file. Check for build.gradle(Module:yourmodulename)
, this is where you have to update.
这篇关于没有找到DSL的gradle方法:“编译()'坚持错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!