File does not reside within any path specified using --proto_path

使用–proto_path=. –swift_out=. ***.proto 生成swift文件时
报错:
File does not reside within any path specified using –proto_path (or -I). You must specify a –proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names — protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it’s harder than you think).

给出明确的路径就可以了,如:
protoc –proto_path=/Users/Mac/Documents –swift_out=/Users/Mac/desktop ***.proto

    原文作者:ablac
    原文地址: https://www.jianshu.com/p/42a480a45cd6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞