Android:数据库文件存储在哪里? [英] Android: Where are database files stored?

查看:68
本文介绍了Android:数据库文件存储在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Android 设备上创建了一个 SQLite 数据库.该程序可以读/写数据库,因此显然已经创建了数据库文件.SQLiteDatabase.mPath 设置为

I created a SQLite database on Android device. The program can read/write to database so the database file has obviously been created. The SQLiteDatabase.mPath is set to

db.mPath = "/data/data/dev.client.android/databases/clientDB.db"

但是当我浏览设备上的目录时,我找不到文件 clientDB.db.我查看了数据目录,但它似乎是空的.

but when I browse the directories on the device I can't locate the file clientDB.db. I looked inside data directory but it appears to be empty.

有谁知道这里有什么问题吗?

Does anyone know what could be wrong here?

推荐答案

如果你的意思是你访问了 /data 并没有发现其中的任何内容,并且你正在检查一个普通的 Android 硬件,那就是预期的.DDMS 无权浏览/data.

If you mean you visited /data and found nothing in it, and you are examining an ordinary piece of Android hardware, that is expected. DDMS does not have permission to browse through /data.

但是,至少如果您的应用是在调试模式下编译的,您可以在控制台使用 adb pull 命令直接下载您的文件.

However, at least if your app is compiled in debug mode, you can use the adb pull command at the console to download your file directly.

这篇关于Android:数据库文件存储在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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