robolectric 2 - create activity with intent

前端 未结 4 728
鱼传尺愫
鱼传尺愫 2021-01-04 18:55

Does creating an activity using the .withIntent() not work in Robolectric 2? I\'m doing the following

    activity = Robolectric.buildActivity(         


        
4条回答
  •  半阙折子戏
    2021-01-04 19:43

    I figured out my problem. I wasn't instantiating the Intent properly. I was instantiating it with the no-arg constructor when i needed to give a Context and the class of the Activity it was being sent to

提交回复
热议问题