我用的Protobuf 2.6.1的版本,在其中用了map数据类型。发现map只能在3.0以上版本使用
Maps are a new feature in protobuf 3.0 (aka "proto3"), which is still in alpha. You are probably using 2.x, in which case there are no maps. Your best bet is to use a repeated field:
repeated MyMap map_field = 4;
message MyMap {
optional string key = 1;
optional string value = 2;
}