我看到StringValue是字符串消息的消息包装器,我试图在其中使用该消息:
service SomeService {
  // health
  rpc HealthCheck(google.protobuf.Empty)
    returns (google.protobuf.Empty) {}
  // create
  rpc CreateSomething(SomeMessageType)
    returns (StringValue) {}
}然而,我收到了一个来自protoc的消息,比如:
somefile.proto:30:14:未定义"StringValue“。
我使用的是proto3语法。我遗漏了什么?
发布于 2017-05-18 22:22:43
好的。
我需要:import "google/protobuf/wrappers.proto";
以及,使用完全限定的google.protobuf.StringValue
https://stackoverflow.com/questions/44058284
复制相似问题