升级后开机就提示“android.process.acore”停止运行 --分析 解决方案

OTA升级的,升级引发的所有问题都是可以解释的,有的能解决,有的不能解决。


一个项目报了这个问题。升级后开机就提示“android.process.acore”停止运行 


抓取 adb log 看到了 下面的这个 fatal  的log 


11-06 14:40:33.633  3827  3827 E AndroidRuntime: FATAL EXCEPTION: main
11-06 14:40:33.633  3827  3827 E AndroidRuntime: Process: android.process.acore, PID: 3827
11-06 14:40:33.633  3827  3827 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.contacts.CallLogProvider: android.database.sqlite.SQLiteException: Can't downgrade database from version 851 to 850
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5043)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4614)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4547)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:151)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:110)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5324)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
11-06 14:40:33.633  3827  3827 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)


从log可以看到  om.android.providers.contacts 联系人模块的数据库出问题了。问题的原因是 Can't downgrade database from version 851 to 850 ,就是说,无法从高级版本的数据库降级到低级版本的数据库。这个应该是android 的限制导致。


google 一下 为什么呢? 

stackvoerflow 有人解释了一下 ,如果你继承下面   onDowngrade 就可以了。但是是联系人是不可以这样做的吧~~

 you are using Android SQLiteOpenHelper, you need to override onDowngrade if you want to be able to run your application with a database on the device with a higher version than your code can handle.

You should care about this "Database Version thing" if ever your database schema is ever going to change (and in general, there is good chance it would).


解决方法: 先备份联系人数据。(最好是网络备份,完全备份db的话可能没有效果)

方法一 

1设置-应用程序管理--联系人--清空数据   2 设置-应用程序管理--拨号盘-清空数据


方法二、 设置-恢复出厂设置 --清空所有数据。然后自动重启到recovery 然后就可以了--等着 一会就好了


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值