在我的项目的基础上执行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。


当前回答

我也遇到了同样的问题,但是在Xcode 6.1.1中-为我修复它的是将两个pod相关目标的配置文件设置更改为None,然后再次运行pod install。

通过选择项目(而不是目标),然后选择Info选项卡,可以找到配置文件设置。

其他回答

我在安装吊舱时也犯了同样的错误。我尝试了所有方法(重新安装pod,更新所有宝石等),并找到了适合我的解决方法。因为改变目标的名字,所以出现了问题。在这种情况下,解决方案很简单:

单击“产品->方案->管理方案…” 单击列表上的目标,并在窗口底部用“-”符号删除它。 点击“+”将目标添加回列表。选择正确的目标和名称。

毕竟,一切都应该正常工作。

我只是在添加一些自定义构建配置后遇到了这个问题。我能看到下面:

Pods (target) > Target Support Files > Pods

它实际上已经创建了新的xcconfig文件,匹配新的构建配置,但由于某种原因,我无法在我的应用程序的项目目标中选择这些文件。

对我来说,固定它的是安装和使用椰子荚分解:

gem install cocoapods-deintegrate

然后运行:

pod deintegrate

紧随其后的是:

pod install

我把pod文件里的pod从目标移到了外面。文件更改如下:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'MyProject' do

pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'

end

:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'

target 'MyProject' do

end

只需遵循Android Studio的说明。 这是错误输出:

"[!] 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`)."

在android studio IDE中,进入IOS文件夹/Flutter,打开文件Release.xconfig

过了这条线:

Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig

删除podfile。锁定并尝试在Xcode中重建。为我工作。

Sorry my previous answer was unclear. This was just one of many errors i've got while trying to set up Cloud Firestore, so this answer is specific for that situation. In order to solve this error and make firebase work, eventually, you have to follow all of the steps from this page: https://firebase.flutter.dev/docs/firestore/overview/ . If you are having problems with generating the 'firebase_options.dart' file, then you need to follow the steps on this page: https://firebase.google.com/docs/cli#mac-linux-auto-script . The last step is optional, but it reduces build time, and I really don't know how or why, but it made some of other errors also disappear... Step 4. Improve iOS & macOS build times, from this page https://firebase.flutter.dev/docs/firestore/overview/. And off course, don't forget to add dependencies in pubspec.yaml: https://pub.dev/packages/firebase_core/install . There is also a great comment here about using Firebase.initializeApp() : https://stackoverflow.com/a/63492262/17626190