Android的单元测试:仪器仪表失败,原因是一类错误

编程入门 行业动态 更新时间:2024-10-09 17:31:06
本文介绍了Android的单元测试:仪器仪表失败,原因是一类错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我运行在一个Android模拟器使用Robotium测试。当我运行我的测试,我得到一个错误说测试失败运行到completion.Reason:仪表失败,原因是

I am running a test using Robotium on an android emulator. When I run my test I get an error saying "Test failed to run to completion.Reason: Instrumentation failed due to

com.example.android.businesslogic.TestBL$1

我检查错误的的logcat的,我看到以下

I check the logcat for error's and I see following

W/ActivityManager( 51) com.example.android.businesslogic.TestBL$1 W/ActivityManager( 51) java.lang.NoClassDefFoundError: com.example.android.businesslogic.TestBL$1

我的应用程序没有任何错误,都可以流畅运行,它只是当我做单元测试,我得到这个。任何帮助深表AP preciated。

My application has no error and can run smoothly, its just when I do the unit test that I get into this. Any help is deeply appreciated.

推荐答案

删除以及适当的类路径和路径的apk再次创建测试项目。你只需要创建一个测试项目,包括任何外部JAR的,如果你有。这为我工作。

Delete and Create the test project again with proper class paths and the path to apk. You just have to create a test project and include any external Jar's if you have. This worked for me.

更多推荐

Android的单元测试:仪器仪表失败,原因是一类错误

本文发布于:2023-11-25 06:30:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1628678.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:仪器仪表   单元测试   错误   原因   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!