0

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 "

Surya Prakash Kushawah
  • 3,185
  • 1
  • 22
  • 42
priyankvex
  • 5,760
  • 5
  • 28
  • 44

2 Answers2

0

Make sure to add the correct dependencies in correct gradle files, like in root build.gradle and 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.

-1

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'
priyankvex
  • 5,760
  • 5
  • 28
  • 44