FragmentActivity can not be tested via ActivityInstrumentationTestCase2

前端 未结 3 1826
轮回少年
轮回少年 2020-12-02 20:51

I have a problem executing android unit tests against android applications that utilize the recently released Fragment support API. When the test is run against a FragmentAc

3条回答
  •  感情败类
    2020-12-02 21:04

    For any IntelliJ users who run into this problem the equivalent fix is to set the scope of your dependency to 'Provided' as follows:

    File > Project Structure > Modules > [select your test app] > dependencies tab > select 'Provided' in scope drop down.

提交回复
热议问题