尝试运行我的颤振项目时,我得到:
运行 pod install 时出错
我试过了:
颤振医生的一切都很好
iOS/Podfile:平台:ios,'9.0'
如果我删除 pubspec.yaml 中的“ flutter_barcode_scanner: ^1.0.1 ”,它会起作用,所以我认为问题来自“ flutter_barcode_scanner: ^1.0.1 ”
颤动运行:
Launching lib/main.dart on iPhone1 in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 7CQFF4JBHQ
Running pod install...
CocoaPods' output:
?
  Preparing
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 `flutter_barcode_scanner` from `.symlinks/plugins/flutter_barcode_scanner/ios`
-> Fetching podspec for `path_provider_linux` from `.symlinks/plugins/path_provider_linux/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`
Resolving dependencies of `Podfile`
  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "flutter_barcode_scanner":
  In Podfile:
    flutter_barcode_scanner (from `.symlinks/plugins/flutter_barcode_scanner/ios`)
Specs satisfying the `flutter_barcode_scanner (from `.symlinks/plugins/flutter_barcode_scanner/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
?
[!] 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`.
Exception: Error running pod install
pubspec.yaml
version: 1.0.0+1
environment:
  sdk: ">=2.7.0 <3.0.0"
dependencies:
  flutter:
    sdk: flutter
  shared_preferences: ^0.5.8
  http: ^0.12.2
  flutter_barcode_scanner: ^1.0.1
  cupertino_icons: ^0.1.3
dev_dependencies:
  flutter_test:
    sdk: flutter
Jid*_*uru 15
该插件要求您将 ios 部署目标设置为 11
来自插件的文档
iOS - 需要 Swift 支持
部署目标:11
要解决此问题,请打开 Podfileios/Podfile并将部署目标更改为 11。
改变你的第二线Podfile从
# platform :ios, '9.0'
到
platform :ios, '11.0'
确保它没有被评论,即没有#在行前
在Flutter项目中,我也遇到了这个问题。通过执行这些步骤修复,(仅供参考-我使用 flutter_barcode_scanner:^2.0.0)
第一步:- 运行此命令
flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
flutter pub get
这可以手动完成,转到 ios/Podfile 并删除 Pods、Podfile 和 Podfile.lock。然后运行flutter pub get
第 2 步:- 使用代码编辑器,在 ios/Podfile 打开 Podfile 并将其更改
# platform :ios, '9.0'   为   platform :ios, '12.0'
第三步:-运行此命令
cd ios
pod install
cd ..
第 4 步:- 在 Xcode 中打开项目并将 iOS 部署目标更改为 12.1

第五步:-
最后一步:- 现在您可以运行
flutter build ios或flutter run
| 归档时间: | 
 | 
| 查看次数: | 2660 次 | 
| 最近记录: |