我在我的应用中使用UrbanAirship进行推送通知。但有一段时间我的应用程序崩溃与android.os.RemoteException。
原因:执行doInBackground()
时发生错误堆栈跟踪
0 java.lang.RuntimeException: An error occured while executing doInBackground()
1 at android.os.AsyncTask$3.done(AsyncTask.java:278)
2 at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
3 at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
4 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
5 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
6 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
7 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
8 at java.lang.Thread.run(Thread.java:856)
9 Caused by: java.lang.RuntimeException: Package manager has died
10 at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:258)
11 at com.urbanairship.analytics.EventService.startService(Unknown Source)
12 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
13 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
14 at android.os.AsyncTask$2.call(AsyncTask.java:264)
15 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
16 ... 4 more
17 Caused by: android.os.RemoteException: Unknown binder error code. 0xfffffff7
18 at android.os.BinderProxy.transact(Native Method)
19 at android.content.pm.IPackageManager$Stub$Proxy.getServiceInfo(IPackageManager.java:1617)
20 at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:253)
21 ... 9 more
22 java.lang.RuntimeException: Package manager has died
23 at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:258)
24 at com.urbanairship.analytics.EventService.startService(Unknown Source)
25 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
26 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
27 at android.os.AsyncTask$2.call(AsyncTask.java:264)
28 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
29 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
30 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
31 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
32 at java.lang.Thread.run(Thread.java:856)
33 Caused by: android.os.RemoteException: Unknown binder error code. 0xfffffff7
34 at android.os.BinderProxy.transact(Native Method)
35 at android.content.pm.IPackageManager$Stub$Proxy.getServiceInfo(IPackageManager.java:1617)
36 at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:253)
37 ... 9 more
38 android.os.RemoteException: Unknown binder error code. 0xfffffff7
39 at android.os.BinderProxy.transact(Native Method)
40 at android.content.pm.IPackageManager$Stub$Proxy.getServiceInfo(IPackageManager.java:1617)
41 at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:253)
42 at com.urbanairship.analytics.EventService.startService(Unknown Source)
43 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
44 at com.urbanairship.analytics.Analytics$AddEventTask.doInBackground(Unknown Source)
45 at android.os.AsyncTask$2.call(AsyncTask.java:264)
46 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
47 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
48 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
49 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
50 at java.lang.Thread.run(Thread.java:856)
如何解决此问题?
答案 0 :(得分:0)
由于“Binder”的默认值,应用程序崩溃了。当您经常通过“绑定服务”处理大型对象并使用服务时,就会出现问题。