开发者

Android Unit Test : Instrumentation failed due to a class error

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

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

 W/ActivityManager( 51) com.example.andro开发者_StackOverflow社区id.businesslogic.TestBL$1
 W/ActivityManager( 51) java.lang.NoClassDefFoundError: com.example.android.businesslogic.TestBL$1

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜