Using PowerMock and Mockito in an Android Instrumentation test - Error - Duplicate files - org.mockito.plugins.MockMaker

后端 未结 3 2279
不知归路
不知归路 2021-02-20 11:29

I”m trying to use PowerMock to mock a class with a static method, but specifically I wish to do this within an Android Instrumentation test. To be clear I wish to run the test o

3条回答
  •  隐瞒了意图╮
    2021-02-20 11:46

    Do you have this into your project/module gradle?

    packagingOptions {
        exclude 'fileNameYouWantToExclude'
    }
    

    In this way Androd will put just one file if duplicates are found

提交回复
热议问题