Question

I compiled a .proto file using version - libprotoc 2.5.0 and updated the corresponding java file to my build which has the protobuff jars corresponding version - libprotoc2.4.1. Now when i start the build , I get the below error in logs

java.lang.verifyerror

I just surmise the cause of the error is the proto file being compiled against different version of protobuffer. So why is the java file not backward compatible with the earlier versions of protobuffers??

I also tried replacing the protobuff 2.4.1 jar in the build with 2.5.0 one but it doesn't work!!

Was it helpful?

Solution

Newer versions of protoc generate code that uses newer library features that aren't available in older versions of the library. Thus, you must use the same version of protoc and libprotobuf.jar. (I don't know why it doesn't work after you update the jar.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top