Pre-Created SQLite database integrate into android app

戏子无情 提交于 2020-01-14 05:49:08

问题


I am trying to develop a dictionary app via Android Studio and SQLite. Watched huge amount of video tutorials, but in videos i can't find what i want. I have a database with words and their meanings, i want to integrate it in app. May be someone can advice books or their known tutorials.Thx

Tried to copy code in videos and looked for books, they all was little bit unclear and not covered parts that i wanted.


回答1:


1) Design and Create the database using you favourite SQLite Management tool (e.g. DB Browser for SQLite, Navicat and others).

2) Create an empty App (or an App according to a template empty is simplest).

3) Create an assets folder in the Apps src/main.

4) Create a databases folder in the newly created assets.

5) Copy the database file into the assets/database folder. used.

6) Read and follow the instructions at SQLiteAssetHelper, noting that the database name will be the same as the file name including the file extension if



来源:https://stackoverflow.com/questions/58709763/pre-created-sqlite-database-integrate-into-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!