简体   繁体   English

在项目中找不到方法greendao()作为参数

[英]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.

相关问题 在根项目上找不到参数android()的方法… - Could not find method android() for arguments … on root project Android Studio错误找不到模块项目上的参数的方法android() - Android Studio error Could not find method android() for arguments on module project 找不到参数 org.gradle.api.Project 的方法 android() - Could not find method android() for arguments org.gradle.api.Project 在根项目上找不到参数[:app]的方法include() - Could not find method include() for arguments [:app] on root project 无法在Android Studio中导入项目(找不到用于参数的方法compile()) - Cant import project in Android studio(Could not find method compile() for arguments) 在 Android Studio 项目中找不到参数的方法 test() - Could not find method test() for arguments on Android studio project 错误:在项目 ':app' 上找不到 arguments [目录 'libs'] 的方法 implimentation() - ERROR: Could not find method implimentation() for arguments [directory 'libs'] on project ':app' 在根项目 Android Studio 上找不到 arguments [:app] 的方法 include() - Could not find method include() for arguments [:app] on root project Android Studio 错误:无法在项目“:app”上找到参数 [目录“libs”] 的方法实现() - ERROR: Could not find method implementation() for arguments [directory 'libs'] on project ':app' 导入android studio项目时找不到参数android()方法 - Could not find method android() for arguments while import android studio project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM