Flutter“运行 pod install 时出错”“Pods-Runner”目标具有传递依赖项

2024-05-26

当尝试运行我的 flutter 项目时,我得到:

运行 pod install 时出错

(我看到另一个非常相似的post https://github.com/flutter/flutter/issues/11856但我不确定我是否也遇到同样的问题。)

我正在 macOS Mojave 版本 10.14.6 上使用 Flutter 编写 Dart 代码。

我试过了:

  • flutter clean
  • flutter doctor
  • flutter upgrade
  • `颤振预缓存
  • flutter run

我已经尝试了所述命令的每种可能组合中的每个颤振命令,但仍然遇到相同的错误。

扑医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
[✓] Connected device (1 available)

• No issues found!

扑腾跑:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...                                              1.3s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

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

    Finding Podfile changes
      M Flutter
      - barcode_scan
      - flutter_webview_plugin
      - google_sign_in
      - path_provider
      - shared_preferences
      - sqflite
      - url_launcher

    Fetching external sources
    -> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
    -> Fetching podspec for `barcode_scan` from
    `.symlinks/plugins/barcode_scan/ios`
    -> Fetching podspec for `flutter_webview_plugin` from
    `.symlinks/plugins/flutter_webview_plugin/ios`
    -> Fetching podspec for `google_sign_in` from
    `.symlinks/plugins/google_sign_in/ios`
    -> Fetching podspec for `path_provider` from
    `.symlinks/plugins/path_provider/ios`
    -> Fetching podspec for `shared_preferences` from
    `.symlinks/plugins/shared_preferences/ios`
    -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
    -> Fetching podspec for `url_launcher` from
    `.symlinks/plugins/url_launcher/ios`

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

    Comparing resolved specification to the sandbox manifest
      A FMDB
      A Flutter
      A GTMSessionFetcher
      A GoogleSignIn
      A GoogleToolboxForMac
      A MTBBarcodeScanner
      A barcode_scan
      A flutter_webview_plugin
      A google_sign_in
      A path_provider
      A shared_preferences
      A sqflite
      A url_launcher




Downloading dependencies

    -> Installing FMDB (2.7.5)
      > Copying FMDB from
      `~/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce
      00` to `Pods/FMDB`

    -> Installing Flutter (1.0.0)

    -> Installing GTMSessionFetcher (1.2.2)
      > Copying GTMSessionFetcher from
      `~/Caches/CocoaPods/Pods/Release/GTMSessionFetc
      her/1.2.2-61bb0` to `Pods/GTMSessionFetcher`

    -> Installing GoogleSignIn (4.4.0)
      > Copying GoogleSignIn from
      `~/Library/Caches/CocoaPods/Pods/Release/GoogleSignIn/4
      .4.0-7ff24` to `Pods/GoogleSignIn`

    -> Installing GoogleToolboxForMac (2.2.1)
      > Copying GoogleToolboxForMac from
      `~/Library/Caches/CocoaPods/Pods/Release/GoogleToolboxF
      orMac/2.2.1-b3553` to `Pods/GoogleToolboxForMac`

    -> Installing MTBBarcodeScanner (5.0.11)
      > Copying MTBBarcodeScanner from
      `~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
      ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`

    -> Installing barcode_scan (0.0.1)

    -> Installing flutter_webview_plugin (0.0.1)

    -> Installing google_sign_in (0.0.1)

    -> Installing path_provider (0.0.1)

    -> Installing shared_preferences (0.0.1)

    -> Installing sqflite (0.0.1)

    -> Installing url_launcher (0.0.1)
      - Running pre install hooks
    [!] The 'Pods-Runner' target has transitive dependencies that include
    statically linked binaries:
    (<flutter_project_repo>/ios/.symlinks/flutter/ios/Flutte
    r.framework)

    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:84:in `block (2 levels) in
    verify_no_static_framework_transitive_dependencies'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:74:in `each_key'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:74:in `block in
    verify_no_static_framework_transitive_dependencies'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:73:in `each'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:73:in
    `verify_no_static_framework_transitive_dependencies'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer/xcode/
    target_validator.rb:38:in `validate!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:590
    :in `validate_targets'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/lib/cocoapods/installer.rb:158
    :in `install!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/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.1/lib/cocoapods/command.rb:52:in
    `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.1/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`.



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

我还更新了许多不同的程序,例如 cocoapods 和 ruby​​gems。

我认为这与以下安装之一有关:

-> Installing MTBBarcodeScanner (5.0.11)
      > Copying MTBBarcodeScanner from
      `~/Library/Caches/CocoaPods/Pods/Release/MTBBarcodeScan
      ner/5.0.11-f453b` to `Pods/MTBBarcodeScanner`

    -> Installing barcode_scan (0.0.1)

因为它使用我的 pubspec.yaml 中的版本, 然后出于某种原因开始使用 0.0.1 。

pubspec.yaml

...
version: 1.0.0+1

environment:
  sdk: ">=2.2.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  easy_localization: ^1.3.1
...

flutter run Error running pod install

不知道我还能做什么来获得更好的错误消息......


您可以在消息中看到错误

[!] 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.

所以,转到文件ios/Podfile在你的项目中,找到这一行

# platform :ios, '9.0'

并取消注释。

之后删除ios/Podfile.lock文件并再次运行项目(或pod update)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Flutter“运行 pod install 时出错”“Pods-Runner”目标具有传递依赖项 的相关文章

  • 水平 UICollectionView 单行布局

    我正在尝试使用以下命令设置简单的水平布局UICollectionView 兜圈子却没有达到预期的结果 所以任何指针或例子将不胜感激 我粘贴经常更改的代码但没有成功可能没什么意义 该图像显示两行 第一行是单个项目 尺寸正确并且在中心正确对齐
  • 如何在 Flutter App 中按时间注销?

    如果用户在登录后对应用程序没有反应或不活动超过 5 分钟 我需要从应用程序中注销用户 该应用程序将转到主登录页面 我尝试实施给定的解决方案here https stackoverflow com questions 52602606 how
  • iOS - UITableViewCell 使文本加粗

    我有一个字符串 NSString userInfo James Johnson james 我想做的就是大胆James Johnson并保留 james正常字体 所以我尝试过的是使用NSAttributedString但为了完成这个过程 我
  • 当 isUserInteractionEnabled false 时,SKSpriteNode 不会让触摸通过

    我正在尝试在 SpriteKit 中创建一个覆盖层 方法是使用SKSpriteNode 但是 我希望触摸穿过覆盖层 所以我设置isUserInteractionEnabled为假 然而 当我这样做时 SKSpriteNode似乎仍然吸收所有
  • 如何检测用户是否第一次打开应用程序[重复]

    这个问题在这里已经有答案了 是否可以检测用户是否是第一次打开iOS应用程序 使用Objective C 我想在用户第一次打开应用程序时显示欢迎消息 但之后不再向他们显示 我正在寻找类似的东西 BOOL firstTime AppDelega
  • 错误消息:您输入的捆绑包 ID 已被使用

    我正在尝试发布一个 iPhone 应用程序 这不是第一个 我过去已经发表过其他的 因此 我在第一个和第二个表单中输入了所需的信息 然后填写了第三个大表单 您还可以在其中上传图标和屏幕截图 好吧 我在上传屏幕截图之前按下了 保存 按钮 因为我
  • BigQuery 未显示链接的 Firebase Analytics 事件日志的任何数据集

    我将我的帐户链接到 Big Query 但 Firebase Analytics 事件不会自动加载到 BigQuery 中 显示 未找到数据集 警告 我的工作进度附在下面 请查收 I have getting firebase Analyt
  • 使用数组中的字符串淡入/淡出标签

    func setOverlayTitle self overlayLogo text Welcome var hello String Bon Jour GUTEN nMORGEN BONJOUR HOLA BUENOS D AS BUON
  • 将类型传递给通用 Swift 扩展,或者理想情况下推断它

    说你有 class Fancy UIView 你想找到所有兄弟姐妹Fancy意见 没问题 https stackoverflow com q 37232743 294884 for v UIView in superview subview
  • 如何删除 UITableView 中的缩进?

    首先 我对此很陌生 我很可能忘记了一些非常简单的事情 问题 我正在制作一个应用程序 在 a 中显示来自 imgur com 的随机图像tableView 由于某种原因 所有单元格都会缩进少量 如下图所示 我摆弄了许多设置storyboard
  • 如何使用phonegap在iOS应用程序中防止键盘推送webview

    当屏幕底部的输入字段获得焦点时 键盘会向上推我的网络视图 并且页面的上部不再可见 我想防止键盘推高网络视图 有人有主意吗 对焦 设置window scrollTo 0 0 这可以防止键盘完全推高 webview input on focus
  • 在 iOS 上使用 RNCryptor 异步解密大文件

    我需要在 iOS 上使用 RNCryptor 异步解密一个大文件 以便显示进度条 我在任何地方都找不到示例 因此尝试了我猜对的方法 但是 我想出的方法不起作用 解密器的处理程序从未被调用 并且线程在发送所有数据后因 EXC BAD ADDR
  • 在 Objective-C 中的 Swift 类上调用 NSStringFromClass 返回模块损坏的名称

    我知道这个问题 https stackoverflow com questions 24107658 get a user readable version of the class name in swift in objc nsstri
  • 有没有办法在 onclick 触发时禁用 iPad/iPhone 上的闪烁/闪烁?

    所以我有一个有 onclick 事件的区域 在常规浏览器上单击时 它不会显示任何视觉变化 但在 iPad iPhone 上单击时 它会闪烁 闪烁 有什么办法可以阻止它在 iPad iPhone 上执行此操作吗 这是一个与我正在做的类似的示例
  • 诊断和仪器均缺少“僵尸”选项

    运行 Xcode 4 0 2 Zombie 选项丢失 其他 SO 帖子建议找到它的两个地方 Product gt Run looks like this Product gt Profile looks like this 奇怪的是 我之前
  • AppLifeCycleState.detached 未被调用

    import package flutter material dart void main gt runApp MyApp class MyApp extends StatelessWidget override Widget build
  • UIViewController 内的 UIsearchController 使用自动布局

    有没有人成功实施过UIViewController其中包含两个UISearchController searchBar and a UItableView使用自动布局来布局所有内容 我正在尝试实现类似的目标1密码 https itunes
  • Flutter Web 平台检查

    我正在尝试找到一种方法来查看我的 flutter web 项目正在哪个平台 iOS 或 Android 上运行 当我使用if Platform isIOS do something 我面临以下错误 Error Unsupported ope
  • 如何在 UITableView 的 switch 语句中创建变量?

    我正在构建一个包含三个部分的 tableView 我已经完成了前两个工作 但最后一个有点阻力 我的问题似乎涉及尝试在 switch 语句中声明变量 实际上是嵌套的 switch 语句 据我所知 这不是一个好主意 但在这种情况下 这似乎是唯一
  • 节拍匹配算法

    我最近开始尝试创建一个移动应用程序 iOS Android 它将自动击败比赛 http en wikipedia org wiki Beatmatching http en wikipedia org wiki Beatmatching 两

随机推荐