[英]Failing to run Robolectric test
I don't know what causes the issue, but I can not run unit tests: 我不知道是什么原因引起的,但是我无法运行单元测试:
Execution failed for task ':module:mockableAndroidJar'.
> org.objectweb.asm.tree.ClassNode.<init>(I)V
Are there command line parameter to see the classpath? 是否有命令行参数来查看类路径? Reading few answers about similar error, looks like I have wrong asm library in my classpath
阅读有关类似错误的一些答案,好像我的类路径中的asm库错误
As I expected the issue was in having old asm
in classpath. 如我所料,问题在于在classpath中有旧的
asm
。
You can see classpath of you gradle in start of the log. 您可以在日志的开头看到gradle的classpath。 I also used next snippet to see it:
我还使用了下一个片段来查看它:
task show << {
buildscript.configurations.classpath.each { println it }
}
And solution to solve our problem next: 接下来解决我们的问题的解决方案:
classpath('com.terrafolio:gradle-jenkins-plugin:1.2.3') {
exclude group: 'asm', module: 'asm-tree'
exclude group: 'asm', module: 'asm'
}
And now I have another issue - lint task is failing. 现在我还有另一个问题-皮棉任务失败。 Looking for solution.
寻找解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.