Can't downgrade database from version 2 to 1 even after fresh install and re-run

后端 未结 10 979
离开以前
离开以前 2020-12-16 01:14

I\'m writing an android app using SQLite DB.

I had few experiments and changed the DB version from 1 to 2.

Then my DB schema became stable and because i didn

10条回答
  •  有刺的猬
    2020-12-16 01:49

    How did you perform the fresh install?

    • adb install -r? In that case, the data of you app, including the database(s), won't be touched.
    • adb uninstall and adb install? This would be the right way to perform a clean installation. All data will be removed during the uninstall and your database will be freshly created after the first start after the install.

    But you write that during the first start after the fresh install, it worked. This can only mean that you somewhere still perform a upgrade to version 2.

提交回复
热议问题