如何查看保存在android数据库(SQLite)中的数据? [英] How to view data saved in android database(SQLite)?
问题描述
我可以从 eclipse(来自 file explorer)查看数据库,但我想查看整个细节,我的意思是我插入的数据,但我无法查看.我在 F Drive 上安装了完整的 Android.
您可以使用模拟器的 DDMS 访问此文件夹.除非您拥有已获得 root 权限的设备,否则您无法在真实设备上访问此位置.
您可以在 Eclipse 中查看表结构和数据.步骤如下
- 为 Eclipse 安装 SqliteManagerPlugin.如果您已经拥有,请跳至第 5 步.
- 从此处
- 将*.jar文件放到eclipse/dropins/文件夹下
- 重启eclipse
- 在 eclipse 的右上角,单击 DDMS 图标
- 在左侧面板中选择合适的模拟器
- 在主面板的文件资源管理器选项卡中,转到/data/data/[YOUR.APP.NAMESPACE]/databases
- 在 DDMS 图标下方,当您选择数据库时,应该有一个新的蓝色数据库图标亮起.单击它,您将看到 Questoid Sqlite Manager 选项卡打开以查看您的数据.
*注意:如果数据库没有亮起,可能是因为您的数据库没有 *.db 文件扩展名.确保您的数据库名为 [DATABASE_NAME].db
*注意:如果你想使用没有 .db-Extension 的数据库:
下载这个 Questoid SqLiteBrowser:http://www.java2s.com/Code/JarDownload/com.questoid/com.questoid.sqlitebrowser_1.2.0.jar.zip
解压并放入 eclipse/dropins(不是插件)
查看更多信息>
I am able to view the database from eclipse(from file explorer), but I want to view the whole detail, I mean the data that I have inserted, which I am unable. And my complete Android installation has made on F Drive.
You can access this folder using the DDMS for your Emulator. you can't access this location on a real device unless you have a rooted device.
You can view Table structure and Data in Eclipse. Here are the steps
- Install SqliteManagerPlugin for Eclipse. Jump to step 5 if you already have it.
- Download the *.jar file from here
- Put the *.jar file into the folder eclipse/dropins/
- Restart eclipse
- In the top right of eclipse, click the DDMS icon
- Select the proper emulator in the left panel
- In the File Explorer tab on the main panel, go to /data/data/[YOUR.APP.NAMESPACE]/databases
- Underneath the DDMS icon, there should be a new blue icon of a Database light up when you select your database. Click it and you will see a Questoid Sqlite Manager tab open up to view your data.
*Note: If the database doesn't light up, it may be because your database doesn't have a *.db file extension. Be sure your database is called [DATABASE_NAME].db
*Note: if you want to use a DB without .db-Extension:
Download this Questoid SqLiteBrowser: http://www.java2s.com/Code/JarDownload/com.questoid/com.questoid.sqlitebrowser_1.2.0.jar.zip
Unzip and put it into eclipse/dropins (not Plugins)
Check this for more information
这篇关于如何查看保存在android数据库(SQLite)中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!