其他手機上是好的,但是華為手機上會出現如下錯誤(後台運行後APP死機)
錯誤代碼先是好多這種錯誤
07-07 17:52:06.210 1345-18305/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.IllegalArgumentException: Unknown URL content://icc/adn1
at huawei.com.android.internal.telephony.HwIccProviderUtils.query(HwIccProviderUtils.java:192)
at huawei.com.android.internal.telephony.HwUiccManagerImpl.simContactsQuery(HwUiccManagerImpl.java:77)
at com.android.internal.telephony.IccProvider.query(IccProvider.java:92)
at android.content.ContentProvider.query(ContentProvider.java:857)
at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
完了後好多如下錯誤
07-07 17:52:31.180 901-1432/? E/DatabaseUtils﹕ Writing exception to parcel
java.lang.SecurityException: Permission denial: writing to settings requires android.permission.WRITE_SETTINGS
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:685)
at android.content.ContentProvider$Transport.call(ContentProvider.java:325)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:284)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
不知道怎麼回事,貌似與華為手機的後台運行機制有關,不知道怎麼解決,求指點
先按照日志提示,添加android.permission.WRITE_SETTINGS權限試試