Espresso检测不到Intent,Recorded intents:[]
来源:互联网 发布:南风知我意 吹梦到西洲 编辑:程序博客网 时间:2024/06/05 07:15
使用Espresso Intent 测试时,Recorded intents一直是空的,一直找不到原因,折腾了几天才发现Espresso.Intents和Jpush有冲突
Activity代码:
Espresso Intents UI测试代码:
报错
android.support.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: Wanted to match 1 intents. Actually matched 0 intents.IntentMatcher: has component: has component with: class name: an instance of java.lang.String package name: an instance of java.lang.String short class name: is ".activity.PublishRepairActivity"Matched intents:[]Recorded intents:[]at dalvik.system.VMStack.getThreadStackTrace(Native Method)
发现是Application中对Jpush进行了初始化造成的,具体为什么会有冲突,不太清楚
解决方案1:
注释掉Jpush的初始化,再跑测试就通过了
解决方案2:
更新到Jpush SDK3.1.0 以上,再跑测试用例,即可跑通。
ps:我之前用的是Jpush SDK3.0.8
阅读全文
0 0
- Espresso检测不到Intent,Recorded intents:[]
- Android Espresso测试Intents,WebView
- Intents and Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- Intents和Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- intents and intent Filters
- Intents和Intent Filters
- Intents and Intent Filters
- Intents and Intent Filters
- Intents和Intent Filters
- Intents and Intent Filters
- Intents和Intent Filters
- OpenVirteX体系结构
- jna
- win7下mysql(10038)问题解决方法
- [搞笑动图]编译错误,括号不匹配
- linux centOS 安装apache+php+mysql及安装discuz
- Espresso检测不到Intent,Recorded intents:[]
- 导入新的maven项目时,目录结构变化,而且build path显示不正常。
- 各种开关的教程---凯利讯半导体
- 译文 | 与TensorFlow的第一次接触 第三章:聚类
- Eureka 源码解析 —— 应用实例注册发现(一)之注册
- 软件工程师的职业建议
- gpg 加密工具的使用
- 安装vue-cli脚手架提示Error: spawn npm ENOENT的解决方式
- 临时