Flutter Xcode build failed 错误无法生成进程
Posted
技术标签:
【中文标题】Flutter Xcode build failed 错误无法生成进程【英文标题】:Flutter Xcode build failed error unable to spawn process 【发布时间】:2021-03-01 02:54:51 【问题描述】:我按照 Flutter 文档进行了安装等操作。下载了 Zip 并解压缩到我自己的开发目录。我添加了颤振路径。
export PATH="/Users/me/dev/flutter/bin:$PATH"
经过测试的颤振医生
$ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.1 20D75 darwin-x64, locale
en-US)
• Flutter version 1.22.6 at /Users/me/dev/flutter
• Framework revision 9b2d32b605 (5 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/me/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for ios and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin installed
• Dart plugin version 201.9317
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin installed
• Dart plugin version 203.6912
[✓] Connected device (1 available)
• iPhone 11 Pro (mobile) • 95B08A93-656C-42F9-AD8B-AF2325CFCAF2 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• No issues found!
/Users/me/dev/flutter/bin/flutter
/Users/me/dev/flutter/bin/dart
然后根据文档设置 Xcode。 最后从命令行创建了flutter项目,然后flutter运行。
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 4.2s
Xcode build done. 48.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: unable to spawn process
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
/usr/bin' (Permission denied) (in target 'Runner' from project 'Runner')
warning: Could not read serialized diagnostics file: error("Failed to open
diagnostics file") (in target 'Runner' from project 'Runner')
error: unable to spawn process
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
/usr/bin' (Permission denied) (in target 'Runner' from project 'Runner')
warning: Could not read serialized diagnostics file: error("Failed to open
diagnostics file") (in target 'Runner' from project 'Runner')
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
无法为模拟器构建应用程序。 在 iPhone 11 Pro 上启动应用程序时出错。
对这个问题有什么想法吗?
【问题讨论】:
【参考方案1】:尝试使用Xcode打开ios文件夹并运行!
【讨论】:
在 Xcode 中,当我打开 iOS 文件时,这是我得到的错误。 Runner 1 问题错误 Runner.app/Info.plist 不存在。 Flutter“精简二进制”构建阶段必须在“复制捆绑资源”之后运行。 Runner Project 1 issue Validate Project Settings Updateto推荐设置Runner.xcodeproj 当我执行 Xcode 请求的建议更改时,我收到此错误 Runner 38 issues Lexical or Preprocessor Issue Group /Users/me/myapp/ios/Flutter/Flutter.framework/Headers/Flutter.h :8:10:双引号在框架头文件中包含“FlutterAppDelegate.h”,预期用尖括号代替/Users/me/myapp/ios/Runner/GeneratedPluginRegistrant.h:8:9:在构建从导入的模块“Flutter”时/Users/me/myapp/ios/Runner/GeneratedPluginRegistrant.h:8:其余的类似抱怨.h文件。以上是关于Flutter Xcode build failed 错误无法生成进程的主要内容,如果未能解决你的问题,请参考以下文章
Flutter Build Fails: InAppWebView error: package okhttp3 does not exist
如何解决错误 FAILURE: Build failed with an exception。 * 其中:脚本 'C:\flutter\packages\flutter_tools\gradle\fl
Flutter 应用程序不是由 Flutter build ios 运行,而是由 xcode 运行
Flutter:gradle build failed with error "A problem occurred evaluation root project 'android' &g