java.lang.IllegalArgumentException: Service Intent must be explicit异常说明
来源:互联网 发布:音频频谱分析软件 编辑:程序博客网 时间:2024/05/29 09:24
在Android 5.0采用隐式意图启动方式
- Intent intent = new Intent();
- intent.setAction("b.aidl.DownLoadService");
- bindService(intent, conn, BIND_AUTO_CREATE);
产生了如下 截图所示的bug
bug说明:
有些时候我们使用Service的时需要采用隐式意图启动的方式,但是Android 5.0一出来后,其中有个特性就是Service Intent must be explitict,也就是说从Lollipop开始,service服务必须采用显式意图方式启动.
解决方案:
- Intent intent = new Intent();
- intent.setAction("b.aidl.DownLoadService");
- intent.setPackage("lq.cn.twoapp"); //指定启动的是那个应用(lq.cn.twoapp)中的Action(b.aidl.DownLoadService)指向的服务组件
- bindService(intent, conn, BIND_AUTO_CREATE);
原文地址:http://blog.csdn.net/redarmy_chen/article/details/47832615
0 0
- java.lang.IllegalArgumentException: Service Intent must be explicit异常说明
- java.lang.IllegalArgumentException: Service Intent must be explicit 异常说明
- java.lang.IllegalArgumentException: Service Intent must be explicit 异常解决
- 20_ java.lang.IllegalArgumentException: Service Intent must be explicit异常说明
- java.lang.IllegalArgumentException: Service Intent must be explicit: Intent {
- java.lang.IllegalArgumentException: Service Intent must be explicit
- java.lang.IllegalArgumentException: Service Intent must be explicit
- java.lang.IllegalArgumentException: Service Intent must be explicit解决方法
- Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit:
- java.lang.IllegalArgumentException: Service Intent must be explicit
- java.lang.IllegalArgumentException: Service Intent must be explicit解决方法
- 5.0上java.lang.IllegalArgumentException: Service Intent must be explicit异常
- java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=xxx}
- java.lang.IllegalArgumentException:Service Intent must be explicit:Intent{act=org.opencv.engine.BIND
- Android报错:Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent
- 解决Android5.0及以上启动Service时,java.lang.IllegalArgumentException: Service Intent must be explicit
- android L java.lang.IllegalArgumentException: Service Intent must be explicit隐式意图找不到错误解决
- Android5.0报错:java.lang.IllegalArgumentException: Service Intent must be explicit
- WCF实例与并发
- linux下 火狐浏览器 默认语言更改为中文
- poj-2579
- 使用iif()的一点困惑
- 纵观jBPM:从jBPM3到jBPM5以及Activiti5(转)
- java.lang.IllegalArgumentException: Service Intent must be explicit异常说明
- 函数
- 堆排序
- AutoLayout框架Masonry使用心得
- 剑指offer学习读书笔记--二维数组中的查找
- UIButton及其方法
- 测试给andorid编写驱动
- utf8_general_ci、utf8_unicode_ci和utf8_bin的区别
- WCF 简易教程 IIS配置(一)