Reputation: 7043
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!!
Upvotes: 0
Views: 266
Reputation: 45326
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.)
Upvotes: 1