square / sqlbrite

A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
https://square.github.io/sqlbrite/3.x/sqlbrite/
Apache License 2.0
4.57k stars 416 forks source link

Can't import FrameworkSQLiteOpenHelperFactory #223

Closed xxia34 closed 6 years ago

xxia34 commented 6 years ago

I've imported sqlbrite 3.0 and I'm trying to use it based on the sample code given. However android studio can't find FrameworkSQLiteOpenHelperFactory specifically. Is there something else I should be importing?

https://github.com/square/sqlbrite/blob/9de0c83830413bbc05734ebd15da8c587ffd23ff/sample/src/main/java/com/example/sqlbrite/todo/db/DbModule.java

JakeWharton commented 6 years ago

Do you have a dependency on the db-framework artifact?

JakeWharton commented 6 years ago

See here: https://github.com/square/sqlbrite/blob/9de0c83830413bbc05734ebd15da8c587ffd23ff/sample/build.gradle#L22 whose variable is: https://github.com/square/sqlbrite/blob/d6ae8b549330a298cbb9d0a3a59a402591e3f013/build.gradle#L37

xxia34 commented 6 years ago

Thanks! I had tried 'com.android.arch.persistence:db-framework:1.0.0' instead of 'android.arch.persistence:db-framework:1.0.0'