TransWikia.com

Android Room library conflict with Requery Sqlite library

Stack Overflow Asked by khamidjon on February 19, 2021

I have a big project already in use, there are many(hundreds of) classes. I want to add a feature like I want to write into SQL database of the phone. And I want to use Android Room library. I am doing everything fine according to the documentation and other reliable sources. However, when I am writing Database class which contains @Database annotation it’s giving me error "cannot find symbol class" which is not related to the code I am writing, which was written months ago. If I remove @Database annotation it’s compiling and running fine. Could you please help to solve it, because I didn’t find case like this one?

I now clarified the real conflict. The thing is that earlier in this project "requery sqlite library" was used, and now there is a conflict between this library and room library.

@Database(entities = [LocationEntity::class], version = 1) line is making error of entity "ChargeItem" which is used in Requery Sqlite library

This ChargeItem is a class written for requery library.

One Answer

  implementation 'androidx.room:room-runtime:2.2.5'
  

makes sure you have this two dependencies.Gradle sync. Also, make sure that you have migrated to androidx support library.

This will be your import statemet for annotation:

  import androidx.room.Database;

Answered by Rishabh Ritweek on February 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP