前言:
想将.proto文件转换成.pb文件时一直报错,一开始以为是文件编码格式的问题,后来将文件改成windows下的utf-8格式后,又出现了新的报错(见下图)。百度了很久,才找到解决方法。
这个报错的意思是:“building_produce”在“WNet”整个文件中必须是唯一的,而不仅仅是在“open_case_type”这个menu中唯一。
所以说这个menu speed_up_target_type中的building_produce在其他地方也有个同名的。
果然搜索后发现有个message building_produce
解决方法:
将enum里的building_produce改个名字咯