service的啟動不能超過10s。

2021-06-17 20:13:50 字數 2826 閱讀 8055

在android啟動的時候,我們開啟乙個service,結果在啟動過程中報錯。出現了如下的異常資訊。然後,我們將啟動的執行**放到thread執行,就解決了問題。

08-08 09:22:17.820: e/activitymanager(2099): anr in com.ztao.printer.server

08-08 09:22:17.820: e/activitymanager(2099): reason: executing service com.ztao.printer.server/.core.printerservice

08-08 09:22:17.820: e/activitymanager(2099): load: 2.24 / 0.98 / 0.37

08-08 09:22:17.820: e/activitymanager(2099): cpu usage from 14658ms to 0ms ago:

08-08 09:22:17.820: e/activitymanager(2099):   95% 1921/sdcard: 51% user + 43% kernel / faults: 82 minor

08-08 09:22:17.820: e/activitymanager(2099):   4.1% 2334/android.process.media: 2.5% user + 1.6% kernel / faults: 280 minor

08-08 09:22:17.820: e/activitymanager(2099):   0.3% 2099/system_server: 0% user + 0.2% kernel / faults: 21 minor

08-08 09:22:17.820: e/activitymanager(2099):   0% 1914/gpsd: 0% user + 0% kernel

08-08 09:22:17.820: e/activitymanager(2099):   0% 4636/android.process.acore: 0% user + 0% kernel / faults: 72 minor

08-08 09:22:17.820: e/activitymanager(2099):   0% 1276/kworker/0:2: 0% user + 0% kernel

08-08 09:22:17.820: e/activitymanager(2099):   0% 1922/adbd: 0% user + 0% kernel

08-08 09:22:17.820: e/activitymanager(2099):   0% 4949/com.sina.weibo: 0% user + 0% kernel / faults: 30 minor

08-08 09:22:17.820: e/activitymanager(2099): 100% total: 54% user + 45% kernel

08-08 09:22:17.820: e/activitymanager(2099): cpu usage from 698ms to 1221ms later with 99% awake:

08-08 09:22:17.820: e/activitymanager(2099):   92% 1921/sdcard: 52% user + 39% kernel / faults: 3 minor

08-08 09:22:17.820: e/activitymanager(2099):     90% 1932/sdcard: 52% user + 37% kernel

08-08 09:22:17.820: e/activitymanager(2099):   5.7% 2334/android.process.media: 1.9% user + 3.8% kernel / faults: 8 minor

08-08 09:22:17.820: e/activitymanager(2099):     5.7% 3788/mediascannerser: 1.9% user + 3.8% kernel

08-08 09:22:17.820: e/activitymanager(2099):   3.7% 2099/system_server: 0% user + 3.7% kernel

08-08 09:22:17.820: e/activitymanager(2099):     1.8% 2136/activitymanager: 0% user + 1.8% kernel

08-08 09:22:17.820: e/activitymanager(2099):   1% 2946/cn.opda.a.phonoalbumshoushou: 0% user + 1% kernel / faults: 1 minor

08-08 09:22:17.820: e/activitymanager(2099): 100% total: 57% user + 42% kernel

08-08 09:22:17.820: w/activitymanager(2099): killing processrecord: background anr

08-08 09:22:17.830: i/activitymanager(2099): process com.ztao.printer.server (pid 5030) has died.

08-08 09:22:17.830: w/activitymanager(2099): scheduling restart of crashed service com.ztao.printer.server/.core.printerservice in 248624ms

08-08 09:22:17.835: i/power(2099): *** acquire_dvfs_lock : locktype : 1  freq : 1000000

Oracle使用IN時不能超過1000的問題

oracle使用in時不能超過1000的問題 ora 01795 列表中的最大表示式數為 1000 當我們使用orcale的in語法時,如果in 裡面的內容元素個數超過1000個就會報 ora 01795的錯誤。最笨重的方法,就是每當達到999的倍數加一就開始用or in select id sel...

利用 上傳不能超過 的檔案

125 是否為附件上傳 126 判斷的根據是contenttype中有無multipart form data 127 128 129 6 2 aspx 1 3 aspx.cs 1 protected void button1 click object sender,eventargs e 2 4....

索引長度不能超過1024位元組

今天,給資料庫建立聯合索引後,插入資料報錯 索引記錄尺度不能超過1024位元組,原因 是因為在定義欄位的時候,字段定義的長度不能過長,如何要在該字段上建立索引,應該符合索引的設計才行,也就是,如果是 1 單列索引,則建立索引的字段的長度定義不能過長,不可以超過索引的限制長度,2 聯合索引,則多個欄位...