Error Connecting to SQlite Db

Stuck at chapter 11 due to the following runtime error.
Database directory has been copied to /data/data/com.bignerdranch.android.criminalintent/ folder from the solutions zip file. I can see the folder under the /data/user/0/com.bignerdranch.android.criminalintent/ folder as well.

E/SQLiteLog: (14) cannot open file at line 35902 of [8201f4e1c5]
E/SQLiteLog: (14) os_unix.c:35902: (13) lstat(/data/user/0/com.bignerdranch.android.criminalintent/databases/crime-database) -
E/SQLiteDatabase: Failed to open database ‘/data/user/0/com.bignerdranch.android.criminalintent/databases/crime-database’.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:723)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:299)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:254)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:194)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:92)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:53)
at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:476)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:281)
at androidx.room.RoomDatabase.query(RoomDatabase.java:324)
at androidx.room.util.DBUtil.query(DBUtil.java:83)
at com.bignerdranch.android.criminalintent.database.CrimeDao_Impl$1.call(CrimeDao_Impl.java:38)
at com.bignerdranch.android.criminalintent.database.CrimeDao_Impl$1.call(CrimeDao_Impl.java:35)
at androidx.room.RoomTrackingLiveData$1.run(RoomTrackingLiveData.java:90)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

Sorry, didn’t really get your question

Here is what worked for me. I ran the app without the databases copied to the emulator. The app will create database files automatically when started up. Afterwards I closed the app on the emulator. Using the Device File Explorer, I uploaded the database folder from the AndroidProgramming4e\11_RoomDatabases directory into the emulator’s data\data\com.bignerdranch.android.criminalintent directory. Afterwards I reran the app and it worked. I hope this helps.

Thank you… That worked.