2017-07-04 10 views
0

gRPCクライアントを作成しようとしています。スケーラでgRPC ManagedChannelを作成できません

val channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext(true).build 

のために私は、このコンパイル時のエラーgRPCは、Java用に構築されて

Error:(18, 87) value build is not a member of ?0 
    val channel = ManagedChannelBuilder.forAddress(host, port).usePlaintext(true).build 

を取得します。私のプロジェクトは、protobufファイルと生成されたコードが別々のモジュールにあるマルチモジュールのmavenプロジェクトです。

答えて

0

私は冗長なキャストを追加することで、この問題を解決するために管理

val channel = ManagedChannelBuilder 
    .forAddress(host, port) 
    .usePlaintext(true) 
    .asInstanceOf[ManagedChannelBuilder[_]].build 
関連する問題