How to use my own sqlite database?

后端 未结 7 483
隐瞒了意图╮
隐瞒了意图╮ 2020-12-02 15:20

I put my database field in \"assets\" folder. And use the code from this blog to copy the database to \"/data/data/my_packname/databases/\", (This copy code i run it in the

7条回答
  •  有刺的猬
    2020-12-02 15:38

    After you've copied the database, you should try closing and reopening the SQLiteDatabase object before executing any query on it. I had a similar problem with copying a db from an input stream and that's what solved it for me.

提交回复
热议问题