wrong description
When practicing AIDL, I encountered the following error:
java.lang.SecurityException: Binder invocation to an incorrect interface
Cause Analysis
According to the error message, it should be caused by the inconsistency of AIDL at both ends. Check the AIDL codes at both ends of the client and server, and no problem is found.
Then check the file location of AIDL, and find that the two ends of the client and server are inconsistent, and the package names of the two AIDL are inconsistent:
Client:
Server:
Solution
Unify the package names of the two as com.example.workdemo2, and then re-run to find that the problem has been solved.