AnswerBun.com

Android Room library conflict with Requery Sqlite library

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.

Stack Overflow Asked by khamidjon on February 19, 2021

1 Answers

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!

Related Questions

C++ Selection Sort not Sorting Some Values of an Array

1  Asked on January 3, 2022 by steffen-brown

         

SIM serial information API level 29

1  Asked on January 3, 2022 by fturriaf

 

AJAX to fetch, get same funcionality

1  Asked on January 3, 2022 by reinaldo-ep

         

Using Sequelize CLI with the ESM package

1  Asked on January 3, 2022 by wdgelwix

   

Why is my psycopg2 not working with python3?

0  Asked on January 3, 2022 by nicole-ganung

       

Problem with even indexes in Java program

6  Asked on January 1, 2022 by iothio

 

calling String method from different class to main class

1  Asked on January 1, 2022 by chan-myae-tun

   

Re-arranging a two-way table

2  Asked on January 1, 2022

   

How to iterate through json file in Java

2  Asked on January 1, 2022 by francemadrid

   

COUNT Multiple Columns using GROUP BY – SQL

3  Asked on January 1, 2022 by barnee

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.