当使用真实设备而不是模拟器时,数据库在 DDMS 文件夹中不可见 [英] Database not visible in DDMS folder when real device used instead of emulator
问题描述
我正在创建一个示例应用程序,它将创建一个数据库、插入数据并最终在微调器中显示它.
为了测试,我使用的是我的安卓手机而不是模拟器(因为我厌倦了它的缓慢响应).
我的问题是应用程序运行成功,但 Spinner 没有显示任何结果,我也无法查看 DDMS->data 下的任何文件夹结构.
我很困惑是否创建了数据库,如果我们使用真实设备而不是emulatepor,请建议我如何查看数据库
您必须启动模拟器,在 DDMS 视图中浏览模拟器文件,然后选择文件资源管理器,然后转到数据 >数据 >com.your.package >数据库 >your_database_name 和一个包含您的数据的新选项卡将出现!它无法在真实设备上运行.
您甚至可以使用 SQLite 浏览器
享受吧!
I am creating a sample application which will create a database, Inserts data and finally displays it in a spinner.
For testing I am using my android phone instead of Emulator (As I am fedup with its slow response).
My problem is application running succesfully but spinner is not displaying any result also I am unable to view any folder structure under DDMS->data.
I am confused whether database created or not, Please suggest me how to view the database if we use real device instead of emulatpor
You must start you emulator, browse the emulator files in the DDMS view then select File explorer then go to data > data > com.your.package > databases > your_database_name and a new tab will appear with your data! It won't work on a real device.
You can even pull/export the database and analyse it more effectively with SQLite Browser
enjoy !
这篇关于当使用真实设备而不是模拟器时,数据库在 DDMS 文件夹中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!