When we added Google Play Services base (from the componentized Google Play Services repackaging), it broke our Robolectric unit tests. All the test 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 I have the latest version of Robolectric (2.4).
I also confirmed the issue was not caused by proguard (as we added it at the same time). The test ran fine with proguard enabled and not importing Google Play Services in our build.gradle. I do know include the Google Play Services does put us over the max method count which is why we are using proguard. I could not find any documentation stating the max dex method issue would be a problem.