Shr*_*rma 35 xcode ios dart cocoapods flutter
我的颤振项目无法在 ios 设备上运行。我试过下面的命令sudo gem install 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.
Run Code Online (Sandbox Code Playgroud)
Jof*_*fre 19
打开终端,导航到项目并键入
rm ios/Podfile
Run Code Online (Sandbox Code Playgroud)
之后用
flutter build ios
Run Code Online (Sandbox Code Playgroud)
它为我解决了这个问题。
就我而言,我在ios/Flutter
文件夹中添加了 2 个文件
1 调试.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
Run Code Online (Sandbox Code Playgroud)
2 发布.xcconfig
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
Run Code Online (Sandbox Code Playgroud)
尝试安装 pod
cd ios
pod install
Run Code Online (Sandbox Code Playgroud)
如果它不起作用,请按照这种方式
导航ios/Podfile文件并取消注释platform :ios, '9.0'
(删除 #)
小智 6
Flutter/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"
Run Code Online (Sandbox Code Playgroud)
打开终端,通过键入以下内容导航到项目:
cd your_file_path
然后输入以下命令导航到 iOS 文件夹:
cd ios
最后,通过键入以下内容来实现缺少的 podfile 来解决您的问题:
pod init
然后,打开新创建的 podfile,按照文件中的说明进行操作(告诉您删除文件第二行的注释)。
关闭您的 Flutter 项目,然后重新打开它。
再次运行您的项目。
当我重构项目以移动主文件夹时,我遇到了类似的问题。为了解决这个问题,我在 Xcode 的工作区设置中做了以下操作:
Legacy Build System
(如@Sumeet Jain 在评论中所解释的)。New Build System (Default)
.现在应该可以工作了,因为我认为它一定已经在工作场所设置中进行了修复。
仅供参考,工作区构建设置可以在 Xcode 文件菜单中找到:“文件/工作区设置”。然后在对话框中的“共享工作区”部分下查找“构建系统”下拉列表。
归档时间: |
|
查看次数: |
39328 次 |
最近记录: |