Could not find class 'com.jayway.android.robot

2019-08-09 22:42发布

问题:

I created test Project. In that i created folder "robotium" and pasted 2 robotium jar files(robotium-solo-3.4.1-javadoc.jar and robtium-solo-3.4.1.jar).from the properties i configured java build path.But i got following failure trace

      java.lang.NoClassDefFoundError: com.jayway.android.robotium.solo.Solo
      at com.example.pkg.test.ThisisitTest.setUp(ThisisitTest.java:19)
      at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
      at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
      at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
      at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1448)

回答1:

Set Debugable to true in android manifest.



回答2:

android:debuggable="true" only doesn't solve the issue in my project. I've to add do this also.

"NoClassDefFoundError" is due to android sdk upgrade to version 17. i need to check robotium.jar in "order and export" in my test project build path



标签: android junit