protobuf-java

Release build fails

不打扰是莪最后的温柔 提交于 2019-12-23 04:12:20
问题 I'm trying to build a signed version (release version) and i got the following error Duplicate zip entry [com/google/protobuf/d$1.class == com/google/protobuf/Any$1.class] I tried to clean,invalidate,and delete gradle files and rebuild it. also updated to the latest version of the gRPC versions and protobuf. Tried this solution too but not working. Here is my build.gradle (app module) file apply plugin: 'com.android.application' apply plugin: 'com.google.protobuf' apply plugin: 'io.fabric'

Protocol Buffers: How to parse a .proto file in Java

情到浓时终转凉″ 提交于 2019-12-10 17:27:40
问题 I am trying to dynamically parse a given .proto file in Java to decode a Protobuf-encoded binary. I have the following parsing method, in which the "proto" string contains the content of the .proto file: public static Descriptors.FileDescriptor parseProto (String proto) throws InvalidProtocolBufferException, Descriptors.DescriptorValidationException { DescriptorProtos.FileDescriptorProto descriptorProto = DescriptorProtos.FileDescriptorProto.parseFrom(proto.getBytes()); return Descriptors

Release build fails

Deadly 提交于 2019-12-09 04:23:39
I'm trying to build a signed version (release version) and i got the following error Duplicate zip entry [com/google/protobuf/d$1.class == com/google/protobuf/Any$1.class] I tried to clean,invalidate,and delete gradle files and rebuild it. also updated to the latest version of the gRPC versions and protobuf. Tried this solution too but not working. Here is my build.gradle (app module) file apply plugin: 'com.android.application' apply plugin: 'com.google.protobuf' apply plugin: 'io.fabric' ext { supportLibraryVersion = '27.1.1' grpcVersion = '1.13.1' googlePlayVersion = '15.0.1'

Protobuf InvalidProtocolBufferException with some strings

北慕城南 提交于 2019-12-06 10:33:01
问题 We using protobuf v.3 to transfer messages from C# client to Java server over HTTP. The message proto looks like this: message CLIENT_MESSAGE { string message = 1; } Both client and server uses UTF-8 character encoding for strings. Everything is fine whe we are using short string values like "abc", but when we trying to transfer string with 198 chars in it, we catchig an Exception: com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended