无法访问Android中SQLite数据库文件 [英] Can not access sqlite database file in Android

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

问题描述

我是一个深化发展的Andr​​oid apllication我至极我有我要提取的文件SQLite数据库(.db的)具有管理器(类似的SQLiteManager例如)来管理它。

I am developping an Android apllication i wich i have an sqlite database which i want to extract the file (.db) to manage it with a manager (like sqlitemanager for example).

有关这一点,我在搜索许多网站和的问题如何是一样的,它包括以下步骤的答案(从的 http://forums.xamarin.com/discussion/4991/copy-sqlite-db-into-android-app <​​/A>):

For that, i searched in many sites and the answer of the "how question" was the same, it consists of the following steps ( from http://forums.xamarin.com/discussion/4991/copy-sqlite-db-into-android-app ) :

1)打开Android的SDK窗口

1) Open the Android-sdk-windows

2),然后打开工具

3)然后打开DDMS

3) then ddms open

4)的Dalvik调试监视器是开放

4) Dalvik Debug Monitor is open

5),然后单击设备 - >文件浏览器

5) then Device -> File Explorer.

6)数据/数据​​/ your_project_package /文件/ your_database_file.db

6) data/data/your_project_package/files/your_database_file.db

7)复制your_database_file.db和开放源码经理

7) copy your_database_file.db and open sqlite manager

我按照通常这些步骤,但我的问题是,我的数据文件夹为空!!,它不含任何其他文件夹,并正在此我虽然安装在设备上的应用程序,所以我不知道什么是问题的根源。

I have followed these steps normally but my problem is that my data folder is empty !!, it does contain any another folder, and am getting this although i installed the application on the device, so i do not know what is the problem source.

我会gratefull任何帮助。

I will be gratefull for any help

感谢。

推荐答案

In the image below,Let if com.android.browser is the package name of your application then your database will be created in the db folder (not in the image ) as a sibling of lib.

注意:虽然与Android的SQLite数据库的工作,我才知道,即使是创建语句后创建的数据库不会出现这些表是executed.They(数据库)仅在DDMS文件浏览器是可见的,当某一行插入table.So确保你开始处理数据库之前您正在执行一些插入。

Note: While working with sqlite database in android,I came to know that the created database will not show up even after the create statement for the tables are executed.They(the databases) are visible only in the DDMS file explorer, when some row is inserted in the table.So make sure you are performing some insertion before you start dealing with the database.

这篇关于无法访问Android中SQLite数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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