A solution is to use: fork in Test := true
instead of: fork in test := true Am Donnerstag, 19. Februar 2015 11:56:18 UTC+1 schrieb David Pérez: > > Now running Robolectric tests with sbt and android-sdk-plugin is easy. > Thanks Perry! :-) > > If I run a test that uses SQLite for the first time: :-) > > testOnly *.MyTest > > > it executes ok. > > But if I execute a 2nd time, it crashes: :-( > > [error] Test myproject.MyTest failed: Could not initialize class > org.robolectric.shadows.ShadowSQLiteConnection > [error] at java.lang.Class.newInstance(Class.java:379) > [error] at > org.robolectric.bytecode.ShadowWrangler.createShadowFor(ShadowWrangler.java:354) > [error] at > org.robolectric.bytecode.ShadowWrangler.initializing(ShadowWrangler.java:81) > [error] at > org.robolectric.bytecode.RobolectricInternals.initializing(RobolectricInternals.java:72) > [error] at > android.database.sqlite.SQLiteConnection.$$robo$init(SQLiteConnection.java) > > I have setup in my project, but doesn't help: > > fork in test := true > > > Possible cause: https://github.com/robolectric/robolectric/issues/1164 > > If I run the tests from IDEA, it runs always ok. > > Any idea on how to setup your tests in SBT in order to avoid this problem? > > Thanks in advance. > > David > -- You received this message because you are subscribed to the Google Groups "scala-on-android" group. To unsubscribe from this group and stop receiving emails from it, send an email to scala-on-android+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.