在我的项目的基础上执行pod安装后,我得到以下错误:

CocoaPods没有设置项目的基本配置,因为您的项目已经有一个自定义配置集。为了实现CocoaPods集成,请将目标BluePlaquesLondonFramework的基本配置设置为Pods/ target Support Files/Pods/Pods.debug.xcconfig,或者在构建配置中包含Pods/ target Support Files/Pods/Pods.debug.xcconfig。

这可能听起来像是一个愚蠢的问题,但是我如何为目标设置基本配置呢?

https://github.com/seanoshea/BluePlaquesLondon/blob/ios8/Podfile是导致此问题的Podfile。

如果你想知道这个项目是什么样子的话,iOS 8分支上的http://github.com/seanoshea/BluePlaquesLondon就是这个问题中的Podfile。


当前回答

这是我在运行pod安装或pod更新后得到的消息:

[!] 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.debug-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig` in your build configuration (`Flutter/Debug.xcconfig`).

[!] 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.release-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

[!] 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-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

下面是我解决这个问题的方法:

将方案添加到项目“Runner”下的Podfile

project 'Runner', {
  'Debug' => :debug,
  'Debug-staging' => :debug,
  'Profile' => :release,
  'Profile-staging' => :release,
  'Release' => :release,
  'Release-staging' => :release,
}

进入ios/颤振/调试。Xcconfig和include

#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig"

进入ios/Flutter/Release。Xcconfig和include

#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig"

颤振清洁 删除podfile.lock 酒吧得到 圆荚体安装

其他回答

对于那些来自Flutter世界的人来说,这是一条误导性的错误消息,建议执行不必要的操作,正确的做法是忽略错误并使用Flutter cli(而不是pod),如https://github.com/flutter/flutter/issues/73845:中所述

Gatzsche说,更好的信息应该是:

在颤振吊舱安装不应手动调用。运行pod install 执行以下命令颤振清除,颤振pub get和 颤振构建ios。

杰马格曼指出:

正如您所指出的,错误消息建议执行不必要的操作。颤振命令抑制来自吊舱的消息。您直接运行pod,这不是一个推荐的工作流。我们无法控制来自CocoaPods的错误消息,并且flutter命令行工具已经抑制了令人困惑的消息。

别瞎捣鼓了,重置。

循序渐进的

显示项目导航器 选择项目 选择信息 在Configurations中,选择每个目标,一次一个(Debug, ApplicationUnitTest, Release,等等),对于每个目标,将configuration设置为None。 确保“基于配置文件”为每个配置读取0配置集或无配置集。这是关键所在。 Xcode辞职 rm -rf Pods/ Podfile。锁;圆荚体安装


一旦你允许pod安装在第7步中发挥它的魔力,你就可以使用自定义配置并更改配置。

所以对我来说,这个问题是由于前面提到的xcconfig文件名在Swift 3更新发生之前被更改了。

有些东西是不同步的,所以Cocoapods创建了一个“恢复引用”文件夹部分与旧的命名文件,并链接到它们。

为了解决这个问题,我:

删除了“恢复的引用”文件夹和包含旧的 Xcode和文件系统中的.xcconfig文件 Xcode辞职 运行pod安装

从那以后,一切都为我处理好了,警告也消失了。

如果您正在使用自定义配置,您可以按照警告中的建议,将Pod配置包含在配置文件中

     #include "Pods/Target Support Files/Pods-YYY/Pods-YYYY.develop-archive.xcconfig"

这将不会停止警告,但将允许您使用您的私人配置(在CocoaPods项目的警告上有一个开放的错误) https://github.com/CocoaPods/CocoaPods/issues/2633

也遇到了同样的问题。它可以建立在模拟器上,但不是在我的设备上。没有一个答案能帮我解决这个问题。以下是我将一些答案拼凑在一起的方法:

Changed my pods file to use a specific target: target :MyProject do pod 'AWSCognitoSync' pod 'Facebook-iOS-SDK' end Ran pod install That gives an error: [!] 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 `MyProject` to `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` or include the `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` in your build configuration. Go Project settings and click on Info tab. There will be an error where it cannot find the Configuration file. Set it to "None" for Debug and Release. Run pod install yet again Clean and build. This works.