Can't open database-Android

前端 未结 3 1725
感动是毒
感动是毒 2021-01-13 12:22

I\'m developing a simple Android application with SQL. I followed the following guides - http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applicatio

3条回答
  •  感动是毒
    2021-01-13 12:52

    I suggest to use an other tutorial. To create a database outside of the devices is "a little bit" wired. I learned it from a book, but i think this tutorial uses the right procedure.

    Edit: Ok, the tutorial is for a special case

    Most all of the Android examples and tutorials out there assume you want to create and populate your database at runtime and not to use and access an independent, preloaded database with your Android application.

    The method I'm going to show you takes your own SQLite database file from the "assets" folder and copies into the system database path of your application so the SQLiteDatabase API can open and access it normally.

提交回复
热议问题