开发者

Android Unit Test : Instrumentation failed due to a class error

开发者 https://www.devze.com 2023-04-13 01:42 出处:网络
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

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

精彩评论

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

关注公众号