Unable to build tests using Gradle (decard-gradle)

I created gradle from the deckrd-gradle project . The problem is that when I run the 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)

Testing 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();
    }
}
+4
source share
1 answer

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

After changing to 0.10. + it all starts

+8
source

Source: https://habr.com/ru/post/1540801/


All Articles