Invalid `Podfile` file: undefined method `pod' for main:Object.

 

如果你是在iOS中引用flutter的时候,报的这个错。建议移步 https://www.cnblogs.com/jukaiit/p/12181184.html

 

其他:

先 "pod setup" 再 "pod install".

还不行的话,

rm -rf ~/.cocoapods 后 "pod setup" 再 "pod install"

或者 

sudo gem install cocoapods

或者 

sudo rm -fr ~/.cocoapods/repos/master
pod setup

 

posted @ 2020-01-09 23:02  鸿鹄当高远  阅读(3220)  评论(0编辑  收藏  举报