[英]Could not find method greendao() for arguments on project
While building the project after adding 在添加后构建项目时
apply plugin: 'org.greenrobot.greendao'
greendao {
schemaVersion 2
}
and 和
compile 'org.greenrobot:greendao:3.2.0'
in dependencies, project is showing error : "Could not find method greendao() for arguments on project " 在依赖项中,项目显示错误:“无法为项目中的参数找到方法greendao()”
Make sure to add the correct dependencies in correct gradle files, like in root build.gradle and app build.gradle 确保在正确的gradle文件中添加正确的依赖项,例如在root build.gradle和app build.gradle中
Add classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1' to root gradle and compile 'org.greenrobot:greendao:3.2.0' to app gradle. 将类路径“ org.greenrobot:greendao-gradle-plugin:3.2.1”添加到root gradle,并将“ org.greenrobot:greendao:3.2.0”编译到应用gradle。
Just add the line : 只需添加以下行:
apply plugin: 'org.greenrobot.greendao'
before the line 行前
apply plugin: 'com.android.application'
and project should build. 和项目应该建立。
ex. 例如
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.android.application'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.