java.lang.SecurityException:Binder调用Android 6上的错误接口

时间:2016-08-23 07:48:57

标签: java android android-securityexception

我们的应用程序中最近因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)

1 个答案:

答案 0 :(得分:5)

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