在我的项目中放置现有数据库的位置 [英] Where to place an existing database in my project

查看:30
本文介绍了在我的项目中放置现有数据库的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在基于 Android - Android Studio 的项目中使用现有的 sqlite 数据库.我在 Google 上进行了搜索,有人建议将其放在资产"文件夹中.但是在项目结构中没有这样的文件夹.项目中的文件夹结构如下

I want to use an existing sqlite database in an Android - Android Studio based projects. I've done a search on Google an some suggests placing it in the 'Assets' folder. However in the project structure there is no such folder. The folder structure in the project is as follows

-res
--drawable
--布局
--菜单
--mipmap
--values

-res
--drawable
--layout
--menu
--mipmap
--values

我应该只添加Assets"文件夹还是应该将我的 sqlite db 文件放在不同的位置.
免责声明:我是 Android Studio 和 Android 开发的新手

Should I just add the 'Assets' folder or should I place my sqlite db file in a different location.
Disclaimer: I'm new to Android Studio and android development

推荐答案

用于创建资产文件夹文件->新建->文件夹->资产文件夹您可以将预先创建的数据库放在那里

for creating asset folder File->New->Folders->Asset Folder you can place your pre-created db in there

这篇关于在我的项目中放置现有数据库的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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