0

我正在使用 Spek 插件在 IDEA-2018.2 中使用 Gradle 构建工具进行 Junit 测试这是上面的依赖版本-

ext.junitPlatformVersion = '1.0.0'
ext.spekVersion = '1.1.5'

依赖-

testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"

运行 throw 时,./gradlew test它可以很好地测试,没有任何错误,但是Spek Run在该测试文件中运行时,它会抛出以下错误-

java.lang.NoSuchMethodError: com.company.Class.method(Linput1; Linput2) Lio/reactivex/Single;

由于公司的隐私没有写出实际的类名和方法。会有任何帮助吗?

4

1 回答 1

0

The dependency that you have added and the one used might be different at runtime, have a double check of all the dependencies that you are using. It clearly says that the method is not available and if you knew it exists then definitely it might be removed (in newer versions) or that method does not exists (in older versions it didn't have that method).

于 2018-08-17T09:07:57.810 回答