dart 在iphone11 Pro Max上启动应用程序时出现错误

ifmq2ha2  于 2023-07-31  发布在  其他
关注(0)|答案(7)|浏览(218)

我完成了我的flutter应用程序,我想在iOS设备中测试它,所以我使用了Mac笔记本电脑,我做了所有的安装,但当我做了命令“flutter运行”我得到了这个错误在iPhone上启动lib/main.dart 11 Pro Max在调试模式.

Running pod install...                                              4,0s
 CocoaPods' output:
 ↳
  Preparing

Analyzing dependencies

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

Finding Podfile changes
  A flutter_barcode_scanner
  A geolocator
  A google_api_availability
  A google_maps_flutter
  A location
  A location_permissions
  A shared_preferences
  A shared_preferences_macos
  A shared_preferences_web
  - Flutter

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 `geolocator` from `.symlinks/plugins/geolocator/ios`
-> Fetching podspec for `google_api_availability` from `.symlinks/plugins/google_api_availability/ios`
-> Fetching podspec for `google_maps_flutter` from `.symlinks/plugins/google_maps_flutter/ios`
-> Fetching podspec for `location` from `.symlinks/plugins/location/ios`
-> Fetching podspec for `location_permissions` from `.symlinks/plugins/location_permissions/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/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.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

Error running pod install
Error launching application on iPhone 11 Pro Max.

字符串

bsxbgnwa

bsxbgnwa1#

试试这个

rm ios/Podfile
flutter pub upgrade
flutter pub run
cd ios
pod init
pod update
flutter clean && flutter run

字符串

ac1kyiln

ac1kyiln2#

Flutter:试试这个

1.删除PodfilePodfile.lockPods folderRunner.xcworkspaceFlutter.framwork(in ios/Flutter folder)

  1. flutter clean
  2. flutter build ios
g2ieeal7

g2ieeal73#

对于m1 Mac我有一个类似的错误谷歌移动的广告。解决方案是你必须从自制软件下载cocoa-pods。2022年更新:https://stackoverflow.com/a/65334677/16122154

dohp0rv5

dohp0rv54#

以下是我的工作:

sudo arch -x86_64 gem install ffi

字符串

mdfafbf1

mdfafbf15#

相信我,我搜索了5个多小时,尝试了我在互联网上找到的每一个解决方案。只有一个工作:
1.删除Podfile,Podfile.lock,Pods文件夹

  1. Flutter 清洗
  2. CD IOS
  3. pod decintegrate(这样pod就不会重新安装旧的库)
    1.联系我们
  4. Flutter 运行
    大多数解决方案不包括步骤4,所以即使你清理和重新安装pod,它仍然表现相同。
zqdjd7g9

zqdjd7g96#

如果你使用的是Flutter,在你的pubspec.yaml文件中,确保你的依赖项安装在库比蒂诺图标行下面,并且缩进正确,否则会抛出错误。

oxf4rvwz

oxf4rvwz7#

https://gorails.com/setup/osx/10.15-catalina
让你的一天快乐感谢朋友的帮助...
macOS Catalina 在预装的ruby和rails上有权限问题。
rbenv是最好的版本控制工具。您需要使用***终端***安装此工具:
打开终端并键入以下命令:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

字符串
然后运行这些命令:

brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
source ~/.zshrc

# Install Ruby
rbenv install 2.7.1
rbenv global 2.7.1
ruby -v
now install pods by going to your ios folder in flutter project
cd ios 
pod install


就这样

相关问题