-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I use "sqlcipher-android" and "spatia-room" correctly? #44
Comments
@YJChen8688 this issue is because you are overriding the spatialite helper factory in this line, I think you could have two possible solutions to use spatialite in your application:
|
I did study up and do have some idea as to what it is. Still, I have been battling this for few evenings now. |
@YJChen8688 let me know if you find a solution, and please share if you have one, I would like to see how you fix your issue. |
@YJChen8688 did you find a solution for your problem? |
|
@johan12345 @dalgarins Hi!
if I encrypt the database directly with "sqlcipher-android":
implementation "net.zetetic:sqlcipher-android:4.5.6@aar"
I get the following error:
ndroid.database.sqlite.SQLiteException: no such function: InitSpatialMetaData (code 1): , while compiling: SELECT InitSpatialMetaData(); at net.zetetic.database.sqlcipher.SQLiteConnection.nativePrepareStatement(Native Method) at net.zetetic.database.sqlcipher.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:973) at net.zetetic.database.sqlcipher.SQLiteConnection.prepare(SQLiteConnection.java:537) at net.zetetic.database.sqlcipher.SQLiteSession.prepare(SQLiteSession.java:592) at net.zetetic.database.sqlcipher.SQLiteProgram.<init>(SQLiteProgram.java:64) at net.zetetic.database.sqlcipher.SQLiteQuery.<init>(SQLiteQuery.java:43) at net.zetetic.database.sqlcipher.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:68) at net.zetetic.database.sqlcipher.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1546) at net.zetetic.database.sqlcipher.SQLiteDatabase.query(SQLiteDatabase.java:1149) at co.anbora.labs.spatia.builder.SpatiaBuilder$roomBuilder$1.onCreate(SpatiaBuilder.kt:34) at co.anbora.labs.spatiaroom.data.AppDatabase_Impl$1.onCreate(AppDatabase_Impl.java:58) at androidx.room.RoomOpenHelper.onCreate(RoomOpenHelper.kt:79) at net.zetetic.database.sqlcipher.SupportHelper$1.onCreate(SupportHelper.java:22) at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:398) at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:278) at net.zetetic.database.sqlcipher.SupportHelper.getWritableDatabase(SupportHelper.java:60) at androidx.room.RoomDatabase.inTransaction(RoomDatabase.kt:632) at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.kt:451) at co.anbora.labs.spatiaroom.data.dao.PostsDao_Impl.insertPosts(PostsDao_Impl.java:95) at co.anbora.labs.spatiaroom.FirstFragment$onViewCreated$1.invokeSuspend(FirstFragment.kt:50) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@247126f, Dispatchers.IO]
How do I use "sqlcipher-android" and "spatia-room" correctly?
Thanks!
The text was updated successfully, but these errors were encountered: