简体   繁体   中英

“onUpgrade()” method from SQLiteOpenHelper is call on fresh app installed

onUpgrade方法是在安装的新应用程序上调用,当我从Android Studio向手机运行代码时,其工作正常(调用了“ onCreate”方法,并成功创建了数据库),但是当我创建签名APK(发布应用程序)时,我在Phone上运行该应用程序,其调用onUpgrade方法并崩溃(调用了编写的A​​lter Table SQL查询),任何帮助将不胜感激。

Try disable backup by adding following to your AndroidManifest.xml :

<application
    android:name=".Application"
    android:allowBackup="false"
  ...
/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM