Hello, 

I am working on creating a Android Studio plugin for proto data store.
Android uses proto-lite, my current approach, i get the .pb file and .proto 
file and use the same in intellij plugin to deserialise it.












*val psiFile = PsiManager.getInstance(project).findFile(protoFile) val 
protoFileContent = psiFile!!.text val fileDescriptorProto: 
DescriptorProtos.FileDescriptorProto = 
DescriptorProtos.FileDescriptorProto.parseFrom(protoFileContent.byteInputStream())
 
val fileDescriptor = 
Descriptors.FileDescriptor.buildFrom(fileDescriptorProto, arrayOfNulls(0)) 
val messageDescriptor = fileDescriptor.messageTypes[0] val buffer = 
pbFile.contentsToByteArray() val messageBuilder: DynamicMessage.Builder = 
DynamicMessage.newBuilder(messageDescriptor) 
messageBuilder.mergeFrom(buffer) val message = messageBuilder.build() val 
text: String = TextFormat.printToString(message)*

Above code is throwing error in parsing step,* Protocol message tag had 
invalid wire type.*

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/7fe3a019-e846-4792-8d8a-1655a2d93975n%40googlegroups.com.

Reply via email to