如何在DB Browser中为SQLite打开sqflite数据库文件? [英] How do I open a sqflite database file in DB Browser for SQLite?

查看:627
本文介绍了如何在DB Browser中为SQLite打开sqflite数据库文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Flutter/Dart应用程序,正在使用Android Studio进行编码.我在sqflite包中使用了一个名为envirodatabase.db的数据库.我想在计算机上的 DB Browser for SQLite 中打开数据库,但是唯一允许我这样做的方法是通过保存文件的副本,而不是文件本身.

I have a Flutter/Dart application that I am coding using Android Studio. I use a database called envirodatabase.db with the sqflite package. I want to open the database in DB Browser for SQLite on my computer, but the only way it lets me do that is through saving a copy of the file, not the file itself.

如何在DB Browser中为SQLite打开原始文件?

How do I open the original file in DB Browser for SQLite?

这是我的设备文件资源管理器

Here is my Device File Explorer

我尝试执行的操作是我在应用程序数据库所在的设备文件资源管理器中右键单击>另存为.我将其保存到桌面上并打开,但是所做的更改不会更新原始文件.

What I tried doing was I right clicked > Save As in the Device File Explorer where my app's database was. I saved it to my desktop and opened it, but the changes don't update the original file.

有不同问题的类似问题:

Similar questions with different problems:

推荐答案

Android Studio将以此方式打开的文件保存在项目外部的临时目录中.如果您对使用设备文件资源管理器打开的文件进行了修改,并且想将所做的更改保存回设备,则必须手动将文件的修改后的版本上传到设备.

Android Studio saves files you open this way in a temporary directory outside of your project. If you make modifications to a file you opened using the Device File Explorer, and would like to save your changes back to the device, you must manually upload the modified version of the file to the device.

https://developer.android.com/studio/debug/device -file-explorer

保存到桌面并进行更改后,回到设备文件资源管理器中,

What I had to was, back in the Device File Explorer, after saving to Desktop and making changes,

  1. 右键单击文件夹
  2. 点击上传
  3. 选择具有数据库更改的文件
  4. (不确定是否需要这样做,但为了安全起见我还是这么做了).右键单击文件夹或文件,然后单击同步".
  5. 热重新启动应用程序(热重新加载也可能起作用,但再次为了安全起见).
  1. Right click the folder
  2. Click Upload
  3. Select the file with the database changes
  4. (Not sure if this is needed but I did it just to be safe) Right click the folder or file and click synchronize
  5. Hot restart the application (hot reload may also work, but again, just to be safe).

这篇关于如何在DB Browser中为SQLite打开sqflite数据库文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆