开发者

How to import SQLite database in Eclipse IDE

I am crea开发者_StackOverflowting an Android Application and I recently downloaded a SQLite Database Browser. I have created a database which has 3 tables. Now I'm wondering on how to import the created database into Eclpise IDE.

I hope someone could help..


You have to put your SQLiteDatabase file inside the assets folder of your project.


Open the DDMS perspective in Eclipse. There you should have a tab saying File Explorer (remember to select your emulator device in the Devices tab). You can use this to browse to your database file on the emulator. The database should be located in \data\data\[name_of_your_app]\databases. You can then select the database file (.db) and copy it to a local folder (there is a Pull a file from the device button in the upper right corner of this tab).

Also note that this is only possible on an emulator, since you're not allowed to browse the content on a real device this way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜