AndroidStudio/Gradle with powermock

后端 未结 7 1419
小鲜肉
小鲜肉 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:57

    I'm posting in order to help future readers, you need to add these dependencies for powermock in AS

    testImplementation 'junit:junit:4.12'
    testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
    testImplementation 'org.powermock:powermock-module-junit4-rule-agent:1.6.2'
    testImplementation 'org.powermock:powermock-module-junit4-rule:1.6.2'
    testImplementation 'org.powermock:powermock-module-junit4:1.6.2'
    
    0 讨论(0)
提交回复
热议问题