No ResourceLoader not found RuntimeException in Robolectric

When we added the Google Play Services base (from recombining components with Google Play components), it broke our tests of the Robolectric unit. All tests failed with the following stack trace:

Caused by: java.lang.RuntimeException: no ResourceLoader found for com.vauto.provision
at org.robolectric.res.RoutingResourceLoader.pickFor(RoutingResourceLoader.java:91)
at org.robolectric.res.RoutingResourceLoader.pickFor(RoutingResourceLoader.java:80)
at org.robolectric.res.RoutingResourceLoader.getValue(RoutingResourceLoader.java:31)
at org.robolectric.AndroidManifest$MetaData.init(AndroidManifest.java:734)
at org.robolectric.AndroidManifest.initMetaData(AndroidManifest.java:395)
at org.robolectric.res.builder.RobolectricPackageManager.addManifest(RobolectricPackageManager.java:366)
at org.robolectric.internal.ParallelUniverse.setUpApplicationState(ParallelUniverse.java:68)
at org.robolectric.RobolectricTestRunner.setUpApplicationState(RobolectricTestRunner.java:440)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:222)

      

I have confirmed that I have the latest version of Robolectric (2.4).

I also confirmed that the problem was not caused by proguard (since we added it at the same time). The test ran fine with proguard enabled and did not import google play services into our build.gradle. I know Google Play Services really puts us at max method, so we use proguard. I couldn't find any documentation that would point out the problem with the max dex method.

+3


source to share





All Articles