3

there was cmdline options to generate message implement parcelable like this:

protoc --javanano_out=optional_field_style=accessors,parcelable_messages=true:d:\ ./message.proto

how to do this with android studio protobuf plugin?

ycboy
  • 31
  • 4

1 Answers1

2

try add

option 'optional_field_style=accessors'
option 'parcelable_messages=true'

in your

javanano{/*add here*/}
sisel free
  • 61
  • 4
  • 1
    I'm using protobuf-lite and I put the options in my `javalite{}`, but it doesn't work. So what should I do? – Marvin Sep 03 '17 at 09:10
  • 1
    Parcelable support of java/javalite compiler not found yet, seems that only javanano compiler support parcelable code gen. Hope for impl for java or javalite . any news? – sisel free Sep 05 '17 at 10:10