Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot build tests with Gradle (decard-gradle)

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();
    }
}
like image 934
MAGx2 Avatar asked Feb 12 '23 23:02

MAGx2


1 Answers

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

like image 193
MAGx2 Avatar answered Feb 25 '23 00:02

MAGx2