Exception in thread "main" java.lang.UnsupportedOperationException: This is supposed to be overridden by subclasses.
at com.google.protobuf.GeneratedMessage.getUnknownFields(GeneratedMessage.java:180)
at com.test.utill.TextFormat$Printer.print(TextFormat.java:251)
at com.test.utill.MessageLiteToStringUtil.toString(MessageLiteToStringUtil.java:20)
at
com.test.protocol.ProtocolTest.main(ProtocolTest.java:23)
出现这个问题是由于protoc.exe的版本和jar包版本不匹配
本文介绍了一种常见问题——Protobuf版本不一致导致的UnsupportedOperationException异常,并提供了详细的错误堆栈跟踪,帮助读者理解问题所在及如何调整protoc.exe版本与jar包版本使其匹配。
289

被折叠的 条评论
为什么被折叠?



