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


当前回答

只需遵循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中重建。为我工作。

其他回答

播客文件中产生问题的行是:link_with ['BluePlaquesLondon', 'BluePlaquesLondonFramework']。

只是让这个:link_with ['BluePlaquesLondon']或这个(在我的情况下工作,希望它会在你的:-)):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

xcodeproj 'BluePlaquesLondon.xcodeproj'
inhibit_all_warnings!
link_with ['BluePlaquesLondon']

def import_pods

     pod 'TTTAttributedLabel', '~> 1.10.1'
     pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.9'
     pod 'Google-Maps-iOS-SDK'
     pod 'IntentKit'
     pod 'HCViews'
     pod 'SVProgressHUD', :head
     pod 'iRate'
     pod 'iOS-KML-Framework', :git => 'https://github.com/FLCLjp/iOS-KML-Framework.git'

end

import_pods

target "BluePlaquesLondonFramework" do
    import_pods
    pod 'Kiwi'
end

Add the relevent xcconfig files to your project. Cocoapods will have created them but you can't set them in Xcode until they are in the project. You probably want to add them to the Pods group where the other pods xcconfig files are. Right click and add files. Search for xcconfig files in your project folder or look in Pods/Target Support Files/[TARGET_NAME]/ (I have different cocoapods configured for each target (extension and main project this may be slightly different in your case) Go to project configurations in the Info of your main project For each target and configuration set the appropriate pods configuration. pod install again and you should see no errors.

我把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

这是我在运行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 酒吧得到 圆荚体安装

最简单的解决方案(在多次遇到这个问题后):

删除Podfile & Podfile。锁从你的项目库(保存Podfile的地方,这样你可以很容易地粘贴到新的Podfile) 运行'pod init' 编辑“Podfile”到你的遗嘱(添加你正在使用的pods) 运行'pod install'

这将在几分钟内重新创建所有内容并工作(不花费时间对“错误”进行逆向工程)。