升級後開機就提示“android.process.acore”停止運行 --分析 解決方案

來源:互聯網
上載者:User

標籤:android   style   io   color   ar   os   java   sp   strong   

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 然後就可以了--等著 一會就好了


升級後開機就提示“android.process.acore”停止運行 --分析 解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.