android - proto3 nested message creation error -


message action {      int32 protocol_version = 1;     int64 uid = 2;      int64 object_uid = 3;      servicetype service_type = 4;      int32 left_messages = 5; }  message sendto {     extend action {         sendto action = 1010;     } } 

if tried create message above gives error service_actions.proto:10:25: "com.sys.test.protocol.action" not declare 1010 extension number.

any suggestion how create such type of messages.

i think forgot add "extenssions" root message. following.

message action {      int32 protocol_version = 1;      int64 uid = 2;       int64 object_uid = 3;       servicetype service_type = 4;       int32 left_messages = 5;       extensions 6 max; } 

Comments