java.lang.SecurityException: Binder invocation to an incorrect interface

在service端和client端都有.aidl文件,一定要放在单独的包中,因为两个app中的MainActivity的包名不相同,会导致两个.aidl文件内容不同。单独一个包,只放.aidl文件,就能保证包名和文件内容都是相同的。

原文地址:https://www.cnblogs.com/RaulYang/p/3801005.html