我正在尝试使用Espresso测试我的活动(HomeActivity),该活动基于NineOldAndroids库具有重复的动画。如此处所述,我关闭了系统动画,但这并没有帮助我,而是导致了一个错误(请见下文)。唯一有用的方法是手动删除动画。那么问题是,我是否需要手动关闭动画(使用BuildConfig似乎更方便),或者我做错了什么?预先感谢你的回答!
java.lang.RuntimeException: Could not launch intent Intent {
act=android.intent.action.MAIN flg=0x14000000
cmp=com.package.en/com.package.ui.HomeActivity } within 45 seconds.
Perhaps the main thread has not gone idle within a reasonable amount
of time? There could be an animation or something constantly
repainting the screen. Or the activity is doing network calls on
creation? See the threaddump logs. For your reference the last time
the event queue was idle before your activity launch request was
1392052899081 and and now the last time the queue went idle was:
1392052899081. If these numbers are the same your activity might be hogging the event
queue.