質問

I created gradle with from deckrd-gradle project. The problem is that when I run test (in Android Studio) I get this error: No signature of method: com.android.build.gradle.AppPlugin.getBootClasspath() is applicable for argument types: () values: []

My gradle file:

(removed it because here wa everything OK)

Test class:

@RunWith(RobolectricTestRunner.class)
public class MainActivityTest {
    @Test
    public void testSomething() throws Exception {

        // given
        Activity activity = Robolectric.buildActivity(MainActivity_.class).create().get();

        // when

        // then
        assertThat(activity).isNotNull();
    }
}
役に立ちましたか?

解決

In file build.gradle (but not for module - for all project) I had 0.9.+ version of gradle.

After changing to 0.10.+ everything starts

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top