Solve the problem of java.lang.SecurityException Binder invocation to an incorrect interface when using aidl

If java.lang.SecurityException: Binder invocation to an incorrect interface is abnormal when using aidl, the reason may be that the aidl package name of the client and the server are inconsistent.
If the package name is confirmed to be the same, and this exception is reported, it may be that the client app has made code obfuscation. Add this package name to proguard-rules.pro to ignore the obfuscation, for example:
-keep public class com.test. aidl.**{*;}
 

Guess you like

Origin blog.csdn.net/chenzhengfeng/article/details/104268260