1.java.lang.SecurityException: Not allowed to bind to service Intent 这个错误,就是绑定不了这个服务
解决办法:在AndroidManifest.xml中给对应的服务添加如下代码
android:process=":remote"
android:exported="true,设置此属性为true,否则出现
<service android:name="包名.服务名"
android:process=":remote"
android:exported="true"
/>
2.
java.lang.SecurityException: Binder invocation to an incorrect interface
主要原因是客户端的aidl文件和与远程调用的Service的aidl文件包名不同
解决办法:我们客户端的aidl接口包名要与远程暴露出来的aidl接口包名要一致