2016-08-23 473 views
1

最近開始在我們的應用中由於java.lang.SecurityException: Binder invocation to an incorrect interface而崩潰,這隻發生在6.0和6.0.1操作系統上。 堆棧跟蹤來自崩潰報告服務,無法在任何Android 6設備上進行本地複製。java.lang.SecurityException:綁定器對Android上不正確的接口的調用

該應用程序使用'Service'調用'startForeground',堆棧跟蹤似乎指向該方法調用。

java.lang.SecurityException: Binder invocation to an incorrect interface 
     at android.os.Parcel.readException(Parcel.java:1620) 
     at android.os.Parcel.readException(Parcel.java:1573) 
     at android.app.ActivityManagerProxy.setServiceForeground(ActivityManagerNative.java:4487) 
     at android.app.Service.startForeground(Service.java:652) 
     at com.anghami.audio.MusicService.J(MusicService.java:3517) 
     at com.anghami.audio.MusicService.b(MusicService.java:2676) 
     at com.anghami.audio.MusicService.F(MusicService.java:2647) 
     at com.anghami.audio.MusicService.a(MusicService.java:2421) 
     at com.anghami.audio.MusicService_.a(MusicService_.java:21) 
     at com.anghami.audio.MusicService_$4.a(MusicService_.java:214) 
     at org.androidannotations.api.a$a.run(BackgroundExecutor.java:401) 
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154) 
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
     at java.lang.Thread.run(Thread.java:818) 
+0

你可能需要分享一些代碼,服務是什麼,綁定/解綁等 – maciekjanusz

回答

4

當客戶端的.Aidl文件放置在錯誤的位置時,發生了問題。 .Aidl文件必須放在客戶端的src文件夾中與服務器端名稱相同的包中。

+0

我對路徑正確,但有一個不同的包名稱。非常感謝。 –