在编写测试类时,你已经在roboelectric中声明了@RunWith注释,其中包含RobolectricGradleTestRunner和RobolectricTestRunner.class.有什么区别,我们应该使用哪一个?为什么首先有2个.如果我使用RobolectricTestRunner然后它对我不起作用它说一些奇怪的错误,如:
"java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity."
Run Code Online (Sandbox Code Playgroud)
然而,如果我使用RobolectricGradleTestRunner,这似乎就消失了.
robolectric ×1