I'm trying to generated java classes from protobuf.
Below is my protobuf -
syntax = "proto2";
package part2;
option java_package = "part2";
message OnlineStoreUser {
required int32 userid = 1;
required string username = 2;
optional string useremail = 3;
}
I run the command main/exec/protoc --java_out=main/java main/proto/datamodel.proto
The protoc is downloaded from link https://github.com/protocolbuffers/protobuf/releases/tag/v3.7.1 where osx-x86_64.zip. I tried version 3.8.0 and 3.9.1 as well.
First error is https://gist.github.com/rajcspsg/07c1ddb889410397ba6fc6f26ab2b158#file-gistfile1-txt-L78. The argument to this function UnusedPrivateParameter
type is not found.
Second error is https://gist.github.com/rajcspsg/07c1ddb889410397ba6fc6f26ab2b158#file-gistfile1-txt-L890. The is no 2 arg overloaded version of internalBuildGeneratedFileFrom
.
What is wrong with my proto file. How can I fix this issue?