Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Google Play 市场上有一个使用 SQLite 的 android 应用程序。我想对应用程序进行新的更新。如果我上传带有更新的新 apk 文件,当用户下载该更新时,那些 SQLite 数据库将被删除并再次创建?更新仅针对图形界面和逻辑,与数据库无关,我没有更改。
他们将留在那里。所有首选项和数据库将保持不变。
Android系统不会弄乱你的数据目录;创建和更新其中的任何文件是您的应用程序的责任。
如果您正在使用SQLiteOpenHelper并增加了数据库版本号,您的onUpgrade函数将被调用。
SQLiteOpenHelper
onUpgrade