为啥我在为 Flutter 使用 codemagic 构建代码时出现“无法为 iOS 构建”?
Posted
技术标签:
【中文标题】为啥我在为 Flutter 使用 codemagic 构建代码时出现“无法为 iOS 构建”?【英文标题】:Why am I getting "Failed to build for iOS" while building code in codemagic for Flutter?为什么我在为 Flutter 使用 codemagic 构建代码时出现“无法为 iOS 构建”? 【发布时间】:2020-11-26 18:21:39 【问题描述】:我按照https://***.com/a/55773996/13761601 中的帖子使用 codemagic.io 执行了这些步骤,但是在构建应用程序时出现“无法为 ios 构建”错误。我不明白为什么会这样。我也附上了下面的屏幕截图。请看一下。另外还附上了日志的屏幕截图
任何其他提供在 Windows 上轻松构建和测试 IOS 应用程序的方法的答案也很容易受到欢迎
日志输出:
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
正在为设备 (ios) 构建 instagram.photo.video.downloader.repost.insta... 检测到项目基本配置,正在删除。 运行 pod install... 7.0s CocoaPods 的输出: ↳ 准备中
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A admob_flutter
A firebase_analytics_web
A firebase_messaging
A flutter_inappwebview
A flutter_local_notifications
A path_provider_linux
A shared_preferences_linux
A url_launcher_linux
R firebase_admob
R flutter_native_admob
- Flutter
- android_intent
- device_apps
- firebase_analytics
- firebase_core
- firebase_core_web
- firebase_in_app_messaging
- firebase_remote_config
- flutter_webview_plugin
- fluttertoast
- intent
- open_file
- path_provider
- path_provider_macos
- permission_handler
- share
- shared_preferences
- shared_preferences_macos
- shared_preferences_web
- sqflite
- url_launcher
- url_launcher_macos
- url_launcher_web
- video_player
- video_player_web
- wc_flutter_share
- webview_flutter
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `admob_flutter` from `.symlinks/plugins/admob_flutter/ios`
-> Fetching podspec for `android_intent` from `.symlinks/plugins/android_intent/ios`
-> Fetching podspec for `device_apps` from `.symlinks/plugins/device_apps/ios`
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
-> Fetching podspec for `firebase_analytics_web` from `.symlinks/plugins/firebase_analytics_web/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `firebase_core_web` from `.symlinks/plugins/firebase_core_web/ios`
-> Fetching podspec for `firebase_in_app_messaging` from `.symlinks/plugins/firebase_in_app_messaging/ios`
-> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
-> Fetching podspec for `firebase_remote_config` from `.symlinks/plugins/firebase_remote_config/ios`
-> Fetching podspec for `flutter_inappwebview` from `.symlinks/plugins/flutter_inappwebview/ios`
-> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
-> Fetching podspec for `flutter_webview_plugin` from `.symlinks/plugins/flutter_webview_plugin/ios`
-> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`
-> Fetching podspec for `intent` from `.symlinks/plugins/intent/ios`
-> Fetching podspec for `open_file` from `.symlinks/plugins/open_file/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `path_provider_linux` from `.symlinks/plugins/path_provider_linux/ios`
-> Fetching podspec for `path_provider_macos` from `.symlinks/plugins/path_provider_macos/ios`
-> Fetching podspec for `permission_handler` from `.symlinks/plugins/permission_handler/ios`
-> Fetching podspec for `share` from `.symlinks/plugins/share/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `shared_preferences_linux` from `.symlinks/plugins/shared_preferences_linux/ios`
-> Fetching podspec for `shared_preferences_macos` from `.symlinks/plugins/shared_preferences_macos/ios`
-> Fetching podspec for `shared_preferences_web` from `.symlinks/plugins/shared_preferences_web/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
-> Fetching podspec for `url_launcher_linux` from `.symlinks/plugins/url_launcher_linux/ios`
-> Fetching podspec for `url_launcher_macos` from `.symlinks/plugins/url_launcher_macos/ios`
-> Fetching podspec for `url_launcher_web` from `.symlinks/plugins/url_launcher_web/ios`
-> Fetching podspec for `video_player` from `.symlinks/plugins/video_player/ios`
-> Fetching podspec for `video_player_web` from `.symlinks/plugins/video_player_web/ios`
-> Fetching podspec for `wc_flutter_share` from `.symlinks/plugins/wc_flutter_share/ios`
-> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios`
Resolving dependencies of `Podfile`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
CDN: trunk Relative path downloaded: CocoaPods-version.yml, save ETag: "871dbc3ac66ab065476ee696d0c77eeb-ssl"
CocoaPods 1.10.0.beta.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.0.beta.1
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
CDN: trunk Relative path downloaded: all_pods_versions_0_3_5.txt, save ETag: "dc581eeab599c36e921b2f682f0981b3-ssl-df"
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.0.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.0.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.0.5/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.0.5/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.0.7/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.0.7/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.0.9/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.0.9/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.12/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.12/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.11/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.11/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.2/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.2/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.5/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.5/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.3/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.3/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.2.2/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.2.2/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.2.1/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.2.1/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.4.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.4.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.0.1/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.0.1/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.0.2/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.0.2/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.3.3/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.3.3/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.3.1/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.3.1/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.2.3/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.2.3/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.10.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.10.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.1.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.1.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.12.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.12.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.0.3/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.0.3/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.17.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.17.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.11.1/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.11.1/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.2.0/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.2.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/2.4.1/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/2.4.1/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/3.5.2/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/3.5.2/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/1.1.7/Firebase.podspec.json to https://cdn.jsdelivr.net/cocoa/Specs/0/3/5/Firebase/1.1.7/Firebase.podspec.json
..
..
..
...rb:308:in `tap'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Users/builder/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/Users/builder/.rbenv/versions/2.6.5/bin/pod:23:in `load'
/Users/builder/.rbenv/versions/2.6.5/bin/pod:23:in `<main>'
错误:CocoaPods 的规范存储库过时,无法满足依赖关系。 要更新 CocoaPods 规范,请运行: pod repo 更新
运行 pod install 时出错
构建失败:| 无法为 iOS 构建
【问题讨论】:
这是他们 Slack 上的支持频道的问题。请务必在此处回答您自己的问题,以便将来其他人可以找到答案。这是他们 Slack 的链接。 join.slack.com/t/codemagicio/shared_invite/… @scottstoll2017 谢谢我会在那里问 链接不再有效 【参考方案1】:尝试在克隆后脚本中运行pod repo update
,看看是否适合您。
【讨论】:
以上是关于为啥我在为 Flutter 使用 codemagic 构建代码时出现“无法为 iOS 构建”?的主要内容,如果未能解决你的问题,请参考以下文章
为啥我在 Flutter 中使用 Firestore 中的 foreach 方法后得到空值?
为啥我在 Flutter 测试期间使用 rootBundle.load 得到“对空值使用空检查运算符”?
为啥我在flutter中更新http包后不能在http.post方法中放一个字符串
为啥我在运行后在 Flutter 上收到“无法执行 aapt”错误?