對于我當前的 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
我的本地房間資料庫使用了一個 HelperFactoryrequery
api 'com.github.requery:sqlite-android:3.36.0'
這一切都很好,除了 Android Studio 不允許我通過App Inspection -> Database Inspector
我發現的唯一方法是將 HelperFactory 配置為僅在發布版本上設定。
設定重新查詢 HelperFactory 時,我可以采用任何方法允許 Android Studio 打開我的設備房間資料庫嗎?
uj5u.com熱心網友回復:
不像應用程式檢查那么容易/方便。您可以使用設備資源管理器定位實際檔案并復制它們,并使用 SQLite 工具(SQLite 的 DB 瀏覽器、SQlite 的 Navicat、DBEaver、SQlite Studio)檢查資料庫。
請注意,除非另有說明,否則檔案已被用作 Room 將使用 SQLite 的 WAL (寫頭日志)。如果有兩個檔案,與資料庫檔案同名但后綴為 -wal 和 -shm 且 -wal 檔案不為空,則部分資料庫將在 -wal 檔案中。所以在這種情況下,復制 -wal 和 -shm 檔案很重要。如果沒有 -wal 檔案或它為空,則資料庫已完全檢查點。
- 這是在 Database Inspector/App Inspection 出現之前使用的方式。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/468697.html
標籤:安卓 安卓工作室 机器人房间 sqliteopenhelper