1

I want to add support for unit tests on an existing Android Studio 1.1 project. I followed this tutorial but I am getting the error:

   java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NoSuchMethodException: android.os.Looper.<init>(boolean)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:228)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at ... 

I found this solution but that only applies to mac, and I can't find a similar way to do it in windows.

John Conde
  • 217,595
  • 99
  • 455
  • 496
Andre Medeiros
  • 224
  • 2
  • 6

1 Answers1

0

I just found out. In my maven settings.xml I added (as specified in maven site):

<localRepository>${user.home}/.m2/repository</localRepository>

After remove it, Roboletric worked fine.

Andre Medeiros
  • 224
  • 2
  • 6