android aidl服务与Binder invocat…
来源:互联网 发布:java日志级别大小 编辑:程序博客网 时间:2024/05/21 17:59
androidaidl服务用于不同客户端来调用,一般是先安装服务(服务没有应用Activity),再安装其他客户端,调用时客户端需定义与aidl服务相同的包名的aidl文件。否则会出现接口找不到,服务无法初始化的问题.而导致Binderinvocation to an incorrect interface的异常。
我做了一个调用谷歌翻译api的客户端。应用的就是此原理。自定义aidl文件,但在使用过程中报如下错误:
02-27 11:42:19.994: WARN/Parcel(31504): **** enforceInterface()expected 'com.google.android.apps.translate.ITranslate' butread
'com.cjq.translator.ITranslate'
02-27 10:16:34.767: ERROR/Translator(30196): Error: Binderinvocation to an incorrect interface
从错误分析得知:我们自定义的aidl文件须与调用的谷歌翻译api的包名不一致,可能是导致 invocation to anincorrect interface的原因。
因此我将aidl文件和服务的包名更改后,再进行调试。问题解决.同时注意AndroidManifest文件也应有相应定义.
0 0
- android aidl服务与Binder invocat…
- Android 使用【AIDL】调用外部服务
- Binder与AIDL服务
- Binder与AIDL服务
- !!! FAILED BINDER&nbsp…
- android Binder与AIDL
- android:phoneNumber 与&nbsp…
- android o…
- android …
- Android Bander设计与实现 - 设计…
- Android Binder机制的Native应用&&Android系统RPC与Binder && Android Service学习之AIDL, Parcelable和远程服务
- ASPNET session客户端与服务…
- Aidl开发流程(android studio)
- Oracle Alerts 与…
- This Android SDK …
- android gallery…
- Android edittext&nbsp…
- 解决 Android tex…
- Android获取其他包的Context和在任…
- android ListView的美化涉及到的一…
- 解决android textview自动换…
- 1.00768E7字符串如何转成long型
- Properties java 读写文件类用法
- android aidl服务与Binder invocat…
- android Bitmap用法总结
- Android是否可以实现静默安…
- 从Service或者是BroadcastReceiver…
- 自由独立
- 动画(Animation) 之 (闪烁、左右摇…
- 探秘腾讯Android手机游戏平台之不…
- Java时间处理(xx天前、xx年前)
- java 冒泡排序