Ios 错误:找不到包含的文件';Pods/Target支持文件/Pods Runner/Pods Runner.debug.xconfig';在搜索路径中(在目标运行程序中)
我的Flatter项目在ios设备上不起作用。 我尝试了下面的命令Ios 错误:找不到包含的文件';Pods/Target支持文件/Pods Runner/Pods Runner.debug.xconfig';在搜索路径中(在目标运行程序中),ios,xcode,flutter,dart,cocoapods,Ios,Xcode,Flutter,Dart,Cocoapods,我的Flatter项目在ios设备上不起作用。 我尝试了下面的命令sudogem安装cocoapods 颤振跑: 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. With
sudogem安装cocoapods
颤振跑:
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.
To install:
sudo gem install cocoapods
pod setup
Running Xcode build...
Xcode build done. 4.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: /Users/sukhjinder/StudioWorkspace/shrutiFlutterProjects/myapp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target
Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the precompiled application for the device.
Error launching application on iPhone.
我在重构项目以移动主文件夹时遇到了类似的问题。我在Xcode的工作区设置中做了以下操作:
- 切换到传统的构建系统(如@Sumeet Jain在评论中所解释的)
- 执行一个构建,它应该可以工作
- 切换回新生成系统(默认)
- 再次运行构建
cd-ios
在“ios”文件夹中导航,然后运行pod-install
对我来说,问题是没有安装吊舱。打开终端,导航到项目并键入
rm ios/Podfile
之后,使用
flutter build ios
它为我解决了问题
cd您的文件路径
cd-ios
pod init
100%有效简易步骤:
cd ios
pod install
如果不起作用,请按此方法操作
导航ios/Podfile文件并取消注释
平台:ios,“9.0”
(删除)在我的情况下,我在ios/flatter
文件夹中添加了2个文件
1 Debug.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
2 Release.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
我假设您的flift项目中已经有了
ios/
文件夹。如果没有,您可以运行flatterbuildios
大多数情况下,此错误的根本原因发生在克隆了Github这样的项目之后
为了修复,您需要获取软件包并安装pod
flutter clean
flutter pub get
cd ios/
pod install
在某些情况下,您可能需要更新Pod回购和Pod。你可以通过跑步来做到这一点
pod repo update
pod update
我尝试了上述所有解决方案,包括完全重新创建ios文件夹。最终起作用的是取消对ios/pod文件中的
platform:ios
行的注释
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
为此:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
我面临着同样的问题,所有的解决方案都不适合我 对我起作用的是:
- 删除你的播客文件(确保备份它)
- 现在将生成一个新的pod文件,或者尝试
命令pod init
- 现在重新运行您的项目,它应该可以工作了
cd /[path_to_project_directory]/ios/
然后
修复了它颤振/Release.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"
#include "Generated.xcconfig"
正在打开.xcproject或.xcworkspace文件???.xcworkspace文件。谢谢,但是我的高级开发人员已经解决了这个问题。我仍然不知道它是如何解决的。他可能已经更改了工作区构建设置->在Xcode->转到文件部分->工作区设置->构建系统->将其更改为
遗留构建系统
,因为颤振是一个全新的系统,切换到旧版构建系统
就没什么意义了。只有在重新安装了Flatter SDKCurios之后,它才对我有效。这个解决方案对我有效,但只有在我点击Flatter run on Terminal时才有效。如果我尝试使用Android Studio(绿色箭头)运行该项目,错误仍然存在。请注意。在项目中找到ios文件夹并运行pod Install。请添加说明。看见