繁体   English   中英

无法在 iOS 仿真器或物理设备上构建 Flutter 应用程序 - 虽然在 Android 上工作正常

[英]Cannot build Flutter app on iOS emulator or physical device - works fine on Android though

一段时间后,我回到了 Android Studio & Flutter,我尝试构建我的应用程序,但出现以下错误:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...

正在运行 pod install... CocoaPods 的 output:↳ 准备中

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
-> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios`

Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

Comparing resolved specification to the sandbox manifest
  A Flutter
  A url_launcher
  A webview_flutter

Downloading dependencies

-> Installing Flutter (1.0.0)

-> Installing url_launcher (0.0.1)

-> Installing webview_flutter (0.0.1)
  - Running pre install hooks
[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/ashleywhitehair/AndroidStudioProjects/cvonline-master/ios/Flutter/Flutter.framework)

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:84:in `block (2 levels) in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:74:in `block in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:595:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

来自 CocoaPods 的错误 output:↳

[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

运行 pod install 时出错 在 iPhone 11 Pro Max 上启动应用程序时出错。

用下面的文本替换整个 pod 文件。

# Uncomment the next line to define a global platform for your project

# platform :ios, '9.0'

target 'testing_gowtham' do

use_frameworks!


pod 'Firebase/Core'
pod 'Firebase/Firestore'
end

如果解决方案 1 不起作用,那么您也可以尝试解决方案 2

platform:ios, '9.0'正在工作...我只是删除了#这个

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM