3

最近开始出现崩溃,因为java.lang.SecurityException: Binder invocation to an incorrect interface我们的应用程序只发生在 6.0 和 6.0.1 操作系统上。堆栈跟踪是从崩溃报告服务中提取的,无法在任何 Android 6 设备上进行本地复制。

该应用程序使用调用“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)
4

1 回答 1

7

当客户端的 .Aidl 文件放置在错误的位置时,就会出现问题。.aidl 文件必须放在客户端的 src 文件夹中与服务器端同名的包中。

于 2016-11-16T09:49:30.210 回答