当我构建一个scala项目来测试带有Gatling的gRPC API时,IntelliJ会告诉这个编译错误。
IntelliJ:
IntelliJ IDEA 2017.3.5 (Community Edition)
Build #IC-173.4674.33, built on March 6, 2018
JRE: 1.8.0_152-release-1024-b15 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Scala插件
Version: 2017.3.15
该项目依赖于另一个项目(API)。后者使用以下pom文件(gRPC)。
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>1.7.0</version>
</dependency>
代码:
val channel = ManagedChannelBuilder
.forAddress("...", 8088)
.usePlaintext(true)
.build() // <---- IntelliJ says "Error:..." here
错误:
Error:(10, 161) value build is not a member of ?0
val channel = ManagedChannelBuilder.forAddress("...", 8088).usePlaintext(true).build()
我看不出代码有什么问题。这是IntelliJ的错误吗?
任何帮助将不胜感激。