2

I am following this example here and integrating it into my current app I am developing. I had previous sql databases but I am not trying to migrate them.

I have the libraries setup and all the code in but when i try to build to test on emulator i get this error.

Error:(27, 60) error: constructor RoomOpenHelper in class RoomOpenHelper cannot be applied to given types;
required: DatabaseConfiguration,Delegate,String,String
found: DatabaseConfiguration,<anonymous Delegate>,String
reason: actual and formal argument lists differ in length

It seems the 'RoomOpenHelper' needs a identityHash and legacyHash. the legacy has is not provided and I cannot figure out why.

Here are the libraries I am using

implementation "android.arch.lifecycle:runtime:1.1.0"
implementation "android.arch.lifecycle:extensions:1.1.0"
annotationProcessor "android.arch.lifecycle:compiler:1.1.0"

implementation "android.arch.persistence.room:runtime:1.0.0"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
compile "android.arch.persistence.room:rxjava2:1.1.0-alpha1"

implementation "android.arch.lifecycle:common-java8:1.1.0"

I have tried with and without the common java8 library.

2 Answers 2

5

I fixed this by updating the 2 persistence libraries to a 1.1.0 alpha build

Sign up to request clarification or add additional context in comments.

Comments

1

It usually caused by variations in room dependencies. Make sure the normal dependency, the annotation dependency, and rxjava support dependency are all in the same version.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.