unable to copy database using SQLiteAssetHelper class

前端 未结 4 1123
野趣味
野趣味 2021-01-07 06:00

I am extending SQLiteAssetHelper class to use my pre-populated database from assets folder but my app crashed and gave an error saying Caused by: android.

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-07 06:30

    Missing databases/mydb.sqlite file (or .zip, .gz archive) in assets, or target folder not writable

    Do you have the database file in your assets/databases folder?

    no, in assets folder only

    SQLiteAssetHelper expects to find the prepopulated database file in databases folder under assets.

提交回复
热议问题