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.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论