使用RequerySqlitePenhelperFactory时如何浏览Android Room数据库
对于我当前的Android应用程序,我正在使用此版本的Android Studio,
Android Studio Dolphin | 2021.3.1 Canary 9
Build #AI-213.7172.25.2113.8473230, built on April 19, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
我的本地房间数据库采用了recrectery
的辅助功能
api 'com.github.requery:sqlite-android:3.36.0'
,除了事实Android Studio不允许我通过数据库浏览数据库。 应用检查 - >数据库Inspector
我发现的唯一方法是配置仅在发布构建上设置的辅助性。
是否可以使用任何方法来设置Android Studio在设备卫生室数据库上打开我的设备室数据库?
For my current Android application I am employing this version of Android Studio
Android Studio Dolphin | 2021.3.1 Canary 9
Build #AI-213.7172.25.2113.8473230, built on April 19, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
my local room database employs a HelperFactory from requery
api 'com.github.requery:sqlite-android:3.36.0'
this all works fine, apart from the fact Android Studio does not allow me to browse the database via the App Inspection -> Database Inspector
the only approach that I have found is to configure the HelperFactory to be set on release builds only.
Is there any method I can employ that allows Android Studio to open my on device room database when requery HelperFactory is set?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不像应用程序检查那样容易/方便。您可以使用设备资源管理器来找到实际文件并复制它们,并使用SQLite工具(sqlite的DB浏览器,sqlite,sqlite,dbeaver,dbeaver,sqlite Studio)检查数据库。
注意否则文件已被用作使用Sqlite的WAL( w rite- rite- a head l < /strong> ogging)。如果有两个文件,则与数据库文件相同,但使用-wal和-shm和-wal文件的后缀不为空,则数据库的一部分将在-wal文件中。因此,在这种情况下,复制-wal和-shm文件很重要。如果没有-WAL文件或它是空文件,则数据库已完全检查点。
Not as easy/convenient as App Inspection. You can use Device Explorer to locate the actual file(s) and copy them and inspect the database with an SQLite tool (DB Browser for SQLite, Navicat for SQlite, DBEaver, SQlite Studio).
Note that file(s) has been used as unless otherwise specified Room will use SQLite's WAL (write-ahead logging). If there are two files, the same name as the database file but suffixed with -wal and -shm and the -wal files is not empty, then part of the database will be in the -wal file. So in such a case it is important to copy the -wal and -shm file. If there is no -wal file or it is empty then the database has been fully checkpointed.