问题是Android Studio找不到通向CocoaPods的路径吗?

我正在try 从Android Studio在我的iPhone上测试我的应用程序.我得到的错误是

Warning: CocoaPods not installed. Skipping pod install.
  CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without CocoaPods, plugins will not work on iOS or macOS.
  For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

Exception: CocoaPods not installed or not in valid state.

我运行了gem list个,安装的gem列表包括:

gem list
 
cocoapods (1.11.2)
cocoapods-core (1.11.2)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)

我跑了

sudo gem uninstall cocoapods && sudo gem install cocoapods

我跑了

flutter clean

我重启了Android Studio.

我跑了 File > Invalidate Caches… > Invalidate and Restart.

我跑了

cd ios
pod install

这将引发以下错误:

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

堆栈溢出对该错误消息的回答是,修复Xcode中的问题.但当我试图在Xcode中打开Android Studio项目时,我会出现以下错误:

Could not open file. (/Users/TDK/StudioProjects/Kabbalah)

有件奇怪的事.当我卸载cocoapods时,它们不会消失:

sudo gem uninstall cocoapods
Remove executables:
        pod, sandbox-pod

in addition to the gem? [Yn]  
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.11.2
➜  Kabbalah git:(main) ✗ gem list

*** LOCAL GEMS ***

abbrev (default: 0.1.0)
activesupport (6.1.4.4)
addressable (2.8.0)
algoliasearch (1.27.5)
atomos (0.1.3)
base64 (default: 0.1.0)
benchmark (default: 0.1.1)
bigdecimal (default: 3.0.0)
bundler (default: 2.2.32)
bundler-unload (1.0.2)
CFPropertyList (3.0.5)
cgi (default: 0.2.1)
claide (1.1.0, 1.0.3)
cocoapods (1.11.2)
cocoapods-core (1.11.2)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)

接下来我该怎么办?如果这不明显,我不知道如何使用Xcode.

推荐答案

该漏洞已在大黄蜂2021.1.1补丁#1(发布于2022年2月9日)中修复.

Ios相关问答推荐

缺少预期的键:';NSPrival yCollectedDataTypes';

如何将模糊输入/模糊输出添加到SwiftUI中的非对称过渡?

如何在SwiftUI中基于嵌套视图中的状态动态显示外部视图的内容?

如何删除点击时按钮的不透明动画?

mapView swift 导致警告有网格错误

Flutter iOS 构建失败并在 ios/Runner/AppDelegate.swift 中出现多个错误

Xcode 不支持 iOS 15.6

来自 c++ 的runtime_error未在 iOS 中捕获

禁用 UITextField 的自动更正

无法同时满足约束 - 没有适当的约束

界面生成器 - 无法从路径加载设计对象(空)

在 iOS 中获取设备位置(仅限国家/地区)

如何在 iOS 的 xib 中设置十六进制 colored颜色 代码

如何在 Swift 中使用包含多个值的查询参数构建一个 URL?

从 NSUserDefaults 字典 iOS 中删除所有键

SLComposeViewController 分享教程

如何在 Swift 中将新单元格插入 UITableView

用 NavigationViewController 快速呈现 ViewController

Parse for iOS:try 运行应用程序时出错

如何将 Cocoapods 与 Swift 项目集成?