开发者

Where do you place the starting SQLite database within an Android project? [duplicate]

This question already has answers here: 开发者_如何转开发 Ship an application with a database (15 answers) Closed 8 years ago.

I have seen many solutions which are code oriented, like if you have to create a table, you would have to create it using code, but this is not good for complex applications, as we have SQLite Browser to create database and its tables, and it generates a database file.

Now the question is, where to place that file in my project, there is no data folder in eclipse project, I dont know what to do, its interaction is not like MySQL where we use driver or connection?


You can follow this steps to use an existing database in your application:

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

I've also made a blog post some time ago which combined the solution above with the use of ormlite:

http://www.b-fil.com/blog/2011/01/20/android-repository-ormlite-existing-sqlite-db/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜