Robolectric没有找到我的Manifest失败我的所有测试

时间:2017-02-09 22:40:35

标签: android unit-testing testing android-testing robolectric

当我尝试用roboelectric运行我的测试时,我得到了这个例外:

java.lang.RuntimeException: build/intermediates/manifests/full/release/AndroidManifest.xml not found or not a file; it should point to your project's AndroidManifest.xml

我的测试类注释如下:

@RunWith(RobolectricGradleTestRunner.class)
@org.robolectric.annotation.Config(constants = BuildConfig.class, sdk = 21)
@PowerMockIgnore({"org.mockito.*", "org.robolectric.*", "android.*"})
@PrepareForTest({Realm.class})
public class DataJUnitTest{}

所以我的所有测试都失败了,因为这个例外有任何帮助,请提前感谢。

1 个答案:

答案 0 :(得分:0)

所以,我使用robolectric版本3.0,一旦我更新到3.2.2一切都解决了