Xcode错误.zprofile:1并且沙箱与Podfile.lock MacBook m1颤动不同步



当我想在Xcode中启动一个现有的flutter项目时,我在终端中收到了这个错误。我使用MacBook M1:

Showing Recent Messages
The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your        CocoaPods installation.

当我启动终端时,我得到这个错误:

/Users/wernergast/.zprofile:1: no such file or directory: /opt/homebrew/bin/brew
/Users/wernergast/.zprofile:2: no such file or directory: /opt/homebrew/bin/brew
/Users/wernergast/.zprofile:3: no such file or directory: /opt/homebrew/bin/brew
/Users/wernergast/.zprofile:4: no such file or directory: /opt/homebrew/bin/brew

我在航站楼试试这个:选项1。要修复类型nano.zprofile,然后删除所有内容,然后执行"X",然后按回车键然后是终端中的错误消失了,但我认为这对我的项目不起作用

选项2

echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/wernergast/.zprofile

当我重新启动终端时,错误又回来了

选项3我删除了libPods我尝试更新cocoapods->不起作用

备选方案4更新pod->不存在

我在新项目(Xcode(中没有得到错误,只是在我使用的模板中
我真的被困了3天,有人能帮我吗?

这对我很有效。在项目根目录中:

flutter clean
flutter pub get
cd ios
pod install
pod update

如果项目已经存在:设置目标跑步者的基本配置。

最新更新