New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
demo中客户端点击remote service,服务端没收到 #6
Comments
谢谢反馈! 引起这个问题的原因应该是 Android 版本导致的。在 Android 11 (API 30) 后,谷歌对 APP 包的可见性做了限制,可以参考:Android - 管理软件包可见性 解决方法:修改客户端的 AndroidManifest.xml,添加 我已经上述操作提交到了仓库,你重新拉取一下即可。 |
感谢,已经解决这个问题了。另外有2个新的疑问:1.服务端的AIDL文件IMyAidlInterface是不是没起任何作用?2.后续有考虑加入linkToDeath机制吗? |
|
好的,感谢 |
有一个新的问题,当我把你的DEMO差分成2个工程后,分别在2个工程里新建一样包名的library,然后将你sample library里的IRemoteService和IRemoteServiceImpl分别拷贝进这2个包名一样的library。先启动服务端APP,然后启动客户端APP并点击test remote service按钮,log("testInt", remoteService.testInt(1234));这一行直接报空指针 |
上面说的情况我没有复现,可能是我的操作流程跟你的不大一样。 |
方便加你QQ交流吗?这里回复效率不太高。。。 |
java.lang.NullPointerException: Expected to unbox a 'int' primitive type but was returned null |
IRemoteService 是服务端和客户端的公用接口,必须保持包名和类名一致。 不好意思,我很久没有用过 QQ 了,所以很早就卸载了。:sweat_smile: |
已经在discussion里上传了2个工程的代码,代码量很少,就是你工程的拆分成的2个APP工程 |
如题,直接跑你的demo工程,分别在手机安装客户端和服务端APP,客户端点击那个remote service按钮,切换到服务端APP,日志并没有打印客户端发送来的信息呀
The text was updated successfully, but these errors were encountered: