Search code examples
androidsqldelight

Problems setting up SQLDelight


I'm trying to use SQLDelight in my project. Everything seems to be working alright in respect of code generation. Unfortunately I can't use the interfaces generated under /build/generated/source/sqldelight/... in my project. When I try to create a class implementing a generated model it gets underlined with the error cannot resolve symbol 'InterfaceName'. I prepared an example project showcasing my problem here. Any help getting it to work is of course much appreciated.


Solution

  • You need to apply the sqldelight plugin on the app, not the project. In your application build.gradle file, right below apply plugin 'com.android.application:' put apply plugin: 'com.squareup.sqldelight'