0

I want to run a JUnit test that uses android.text.format.Time, but when I try to add android.jar to the classpath, I get "java.lang.RuntimeException: Stub!", because android.jar contains only stub implementation of the classes.

How do I run a normal Java program and use the Time library android.text.format.Time?

Community
  • 1
  • 1
anomal
  • 2,249
  • 2
  • 19
  • 17
  • 2
    Have you looked at [Robolectric](http://robolectric.org)? – Ben Jan 05 '14 at 05:09
  • @Ben - Can I use Robolectric without Maven? – anomal Jan 05 '14 at 05:56
  • I believe so. There's some discussion of that [here](http://stackoverflow.com/questions/16906930/is-anyone-out-there-using-robolectric-without-maven-on-intellij). – Ben Jan 05 '14 at 06:32

0 Answers0