AndroidStudio /摇篮与powermock [英] AndroidStudio/Gradle with powermock

查看:246
本文介绍了AndroidStudio /摇篮与powermock的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到如何设置powermock与Android工作室/摇篮任何信息。我用尽了一切导致在建例外。

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 to do it?

感谢。

推荐答案

林张贴,以帮助未来的读者,你需要在AS添加这些依赖关系powermock

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

testCompile 'junit:junit:4.12'
testCompile 'org.powermock:powermock-api-mockito:1.6.1'
testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.6.1'
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1'
testCompile 'org.powermock:powermock-module-junit4:1.6.1'

这篇关于AndroidStudio /摇篮与powermock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆