ios - 从 Android Studio 构建 Flutter 项目时它失败了,但不是从 Xcode(在 Flutter 升级之后)
问题描述
我最近升级了 Flutter 框架,当我尝试从 Android Studio 构建和运行项目时,我收到以下警告和错误:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 2.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
<built-in>:1:10: warning: non-portable path to file '"/Users/<something ...>/ios/Pods/Target Support Files/AppCenter/appcenter-prefix.pch"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "/Users/<something ...>/ios/Pods/Target Support Files/appcenter/appcenter-prefix.pch"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"/Users/<something ...>/ios/Pods/Target Support Files/AppCenter/appcenter-prefix.pch"
1 warning generated.
1 warning and 1 error generated.
error: the following command failed with exit code 0 but produced no further output
CompileC /Users/stefanciprian/Library/Developer/Xcode/DerivedData/Runner-gsbrrhndnahwimaidnqhpsuayzxa/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/appcenter_analytics.build/Objects-normal/x86_64/AppcenterAnalyticsPlugin.o /Users/stefanciprian/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/appcenter_analytics-0.2.1/ios/Classes/AppcenterAnalyticsPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
如果我在 Xcode 中打开项目,我会收到相同的警告,但不知何故,我设法在模拟器上成功构建和运行。
我尝试了 GitHub 问题中有关路径和符号链接的一些建议,但它们似乎不起作用。
还添加了颤振医生信息:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-RO)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1)
[✓] VS Code (version 1.41.1)
[✓] Connected device (1 available)
• No issues found!
解决方案
推荐阅读
- multithreading - 一次只使用一个石英线
- excel - Excel VBA 与网页的交互
- javascript - 如何在 Gatsby for mobile 中更改图像的固定高度?
- c# - 委托 DynamicInvoke 与 MethodInfo 调用?
- office365 - 如何启用不显示主页 SharePoint 页面的全局导航
- django - 如果登录不存在,Django rest 创建用户
- amazon-web-services - 通过 AWS Cloudwatch 事件为 Fargate AWS Batch 作业设置 cpu 和内存要求
- cocoa - Autolayout:使用 NSUserInterfaceCompression 的条件内容压缩阻力优先级
- python - 如何在烧瓶 python 中同时返回新的 csv 文件和 web 中的绘图图
- java - 像 Whatsup 一样更改表情符号大小