Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install:
sudo gem install cocoapods
CocoaPods not installed or not in valid state.
Error launching application on iPhone 11 Pro Max.
Run Code Online (Sandbox Code Playgroud)
小智 115
我认识的一个人遇到了这个问题,另一个人推荐了这个修复程序。
从终端运行此命令:
open /Applications/Android\ Studio.app
Run Code Online (Sandbox Code Playgroud)
问题是有 3 个可能的资源路径,您可以在其中放置配置路径......
因此,当您的配置路径不在 ~/.profile 文件中时,将无法从启动板的打开链接访问它。每当您打开终端会话时,所有 3 个路径都会自动同步。这就是区别。
小智 37
我也有类似的问题。我刚刚做了以下几件事。
flutter cleanflutter pub getflutter run小智 30
通常发生这种情况是由于 Visual Studio 或 IntelliJ 无法找到路径或相关的插件或扩展。解决方案:
如果不完全关闭项目,最后一步应该可以解决问题
GJJ*_*GJJ 16
用于brew安装cocoapods
sudo gem uninstall cocoapodsbrew install cocoapodsbrew link --overwrite cocoapods如果需要取消链接并再次链接brew unlink cocoapods && brew link cocoapods
小智 14
这个问题可能是因为你安装了多个版本的 cocoapods。
您可以检查并解决它运行:
gem list 检查是否安装了多个版本的 cocoapodsudo gem uninstall cocoapods 它会提示您选择卸载哪个,或者是否要全部卸载sudo gem install cocoapods如果您卸载了所有 cocoapods,则附加步骤
pod install然后应该允许您在 iOS 设备上运行 xcode 构建。
Ash*_*bhu 14
以下内容在我的案例中有效:
brew install cocoapods --build-from-source
then: brew link --overwrite cocoapods
Run Code Online (Sandbox Code Playgroud)
有关此问题的更多信息,请访问: https: //github.com/CocoaPods/CocoaPods/issues/8955
小智 11
在视觉代码上重新安装颤振扩展修复了这个问题
我遇到过同样的问题。以下为我工作
如果您使用Visual Studio Code进行 Flutter 开发,该问题可能与解析 shell 环境失败有关:
\n\n很多时候,当从 UI(Spotlight、Dock 等)运行时,Visual Studio Code无法按时加载 shell 环境变量(无论您使用哪个 shell - bash、zsh等)。因此,PATH和其他环境变量未(正确)加载,这可能导致“ CocoaPods 未安装或未处于有效状态”错误。
解决方法是从终端运行Visual Studio Code(而不是从 UI 启动它),然后照常继续进行 MacOS/iOS 编译,即
\nopen -a "Visual Studio Code"
(或者只是code如果您遵循本指南并将Visual Studio Code添加到PATH环境变量)
\xe2\x9d\x97\xef\xb8\x8f\xe2\x9d\x97\xef\xb8\x8f\xe2\x9d\x97\xef\xb8\x8f 无需重新安装 CocoaPods/Flutter 插件 \xe2\x9d\ x97\xef\xb8\x8f\xe2\x9d\x97\xef\xb8\x8f\xe2\x9d\x97\xef\xb8\x8f
\n小智 6
我尝试了 heymonkeyriot 提出的解决方案,但这还不够。对我有用的是卸载 cocoapods (当被问及删除 pod 时回答 Y)和 cocoapods-core,然后重新安装 cocoapods 并运行 pod install :
sudo gem list
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem install cocoapods
Run Code Online (Sandbox Code Playgroud)
更改为我的项目的 ios 目录
pod install
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28967 次 |
| 最近记录: |