INSTRUMENTATION_RESULT:shortMsg = java.lang.NoClassDefFoundError的运行Android仪器测试 [英] INSTRUMENTATION_RESULT: shortMsg=java.lang.NoClassDefFoundError running Android Instrumentation tests

查看:1345
本文介绍了INSTRUMENTATION_RESULT:shortMsg = java.lang.NoClassDefFoundError的运行Android仪器测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试和新的4.4的设备上运行的手机的Andr​​oid仪器测试这种错误发生时,他们一直工作在过去的

  [回应]运行测试...
[回应]运行测试...
[执行] INSTRUMENTATION_RESULT:shortMsg = java.lang.NoClassDefFoundError的
[执行] INSTRUMENTATION_RESULT:longMsg = java.lang.NoClassDefFoundError的:org.mockito.internal.runners.RunnerImpl
[执行] INSTRUMENTATION_ code:0
 

解决方案

我贴这个问题,以帮助他人避免浪费时间愣神像我这样做!

但问题是,当我在我的Nexus 4升级到Android 4.4奇巧,我决定通过激活新的Andr​​oid运行(ART)在开发者选项设置菜单中打转转。

这是结果!

要运行的仪器测试,切换回Dalvik的!

我使用的Mockito,Dexmaker和Dexmaker-的Mockito所有运行具有的Mockito仪器测试和使用艾玛获取覆盖数据......

毫无疑问,某些更新或改变的方式将需要在未来的测试上的Dalvik和/或技术......

This error happens when I try and run my Android Instrumentation tests on a new 4.4 device, when they have always worked in the past

[echo] Running tests...
[echo] Running tests ...
[exec] INSTRUMENTATION_RESULT: shortMsg=java.lang.NoClassDefFoundError
[exec] INSTRUMENTATION_RESULT: longMsg=java.lang.NoClassDefFoundError: org.mockito.internal.runners.RunnerImpl
[exec] INSTRUMENTATION_CODE: 0

解决方案

I posted that question to help others avoid wasting time stupidly like I have done!

The problem was that when I upgraded my Nexus 4 to Android 4.4 Kitkat, I decided to play around by activating the new Android RunTime (ART) in the Developer's Options settings menu.

That is the result!

To run your instrumentation tests, switch back to Dalvik!

I'm using Mockito, Dexmaker and Dexmaker-Mockito all to run Instrumentation tests with Mockito and use Emma to get coverage data....

No doubt some updating or change of approach will be needed in the future to test on Dalvik and/or ART....

这篇关于INSTRUMENTATION_RESULT:shortMsg = java.lang.NoClassDefFoundError的运行Android仪器测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆