getActivity() call causes RuntimeException: Could not launch intent Intent act=android.intent.action.MAIN

前端 未结 4 1160
走了就别回头了
走了就别回头了 2021-02-05 15:47

Updated #1: more info added to the end of this post

I\'m new to Android development and testing.

I have three Espresso tests. First test passes, but the

4条回答
  •  一向
    一向 (楼主)
    2021-02-05 16:15

    Try the following:

    @Before
    public void setUp() throws Exception {
        super.setUp();
        Log.d(TAG, "SETUP");
        activity = getActivity();
    }
    

提交回复
热议问题