I am getting such notice
Error reading Sqlite database: Unable to perform an operation on database (id=3). The database may have already been close
I got a simple solution not to use the DataBase inspector. remove it from the bottom menu. if you not click on it studio work properly. the problem comes after you open the 'Database inspector tab' remove process: Right-click on database inspector -> remove form slider
I always have this issue with an Android 11 Emulator.
Google known this issue and published an update for them. To solve this update your emulator Android 11 images to revision 9, and all things works fine.
Steps to solving this issue:
Show Package Details
(right bottom corner)Android 11.0 (R)
... System Image
options to minimum Revision 9Now your application should work with active database inspector.