我用
protoc -I examples/src/main/proto -I examples/build/extracted-protos/main --java_out=examples/build/generated-sources/main --java_plugin_out=examples/build/generated-sources/main --plugin=protoc-gen-java_plugin=compiler/build/binaries/java_pluginExecutable/java_plugin examples/src/main/proto/route_guide.proto
生成代码。
当我为这个 proto 文件修改 Android 演示时,运行./gradlew installDebug
我遇到了一个问题:
no suitable constructor found for HelloRequest()
HelloRequest message = new HelloRequest();
^
constructor HelloRequest.HelloRequest(CodedInputStream,ExtensionRegistryLite) is not applicable
(actual and formal argument lists differ in length)
constructor HelloRequest.HelloRequest(Builder) is not applicable
(actual and formal argument lists differ in length)