AndroidStudio/Gradle with powermock

后端 未结 7 1517
小鲜肉
小鲜肉 2020-12-29 01:28

I couldn\'t find any info on how to setup powermock with Android Studio/Gradle. Everything I\'ve tried resulted in build exceptions.

Could anybody show a correct way

7条回答
  •  时光取名叫无心
    2020-12-29 01:40

    // mockito
    testImplementation 'org.mockito:mockito-core:2.4.0'
    androidTestImplementation 'org.mockito:mockito-core:2.4.0'
    // PowerMock
    testImplementation 'org.powermock:powermock-core:1.7.0RC2'
    testImplementation 'org.powermock:powermock-module-junit4:1.7.0RC2'
    testImplementation 'org.powermock:powermock-api-mockito2:1.7.0RC2'
    

提交回复
热议问题