原型编译器生成的Java类无法构建

时间:2017-01-12 23:49:37

标签: java protocol-buffers proto3

我有一个简单的.proto文件,我从中生成java类。 proto文件看起来像这样。

message Address {
    string city = 1;
    string country = 2;
}

message PersonalInfo {
    string name = 1;
    repeated Address adresses = 2;
}

错误是:

 error: incompatible types: com.google.protobuf.GeneratedMessageV3.BuilderParent cannot be converted to com.google.protobuf.AbstractMessage.BuilderParent
            getParentForChildren(),
                                ^

我使用3.1.0生成类并构建java源代码。我是否有错误的配置,proto文件是不正确还是proto中的错误?

0 个答案:

没有答案