'Pods-Runner'目标具有传递依赖项,包括静态链接的二进制文件:(.../ios/Flutter/Flutter.framework) [英] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (.../ios/Flutter/Flutter.framework)

查看:579
本文介绍了'Pods-Runner'目标具有传递依赖项,包括静态链接的二进制文件:(.../ios/Flutter/Flutter.framework)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行flutter build ios时升级到Flutter版本1.17.4后,我得到以下输出:

[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (.../ios/Flutter/Flutter.framework)

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/installer/xcode/target_validator.rb:74:in `each_key'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `verify_no_static_framework_transitive_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:590:in `validate_targets'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:158: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 running pod install

我尝试过的事情:

  1. 根据建议删除ios/Flutter/Flutter.framework并运行pod install 这里没有帮助
  2. s.static_framework = true添加到Flutter.podspec-不走运
  3. 删除-正在重新创建ios文件夹-祝您好运
  4. 注释Podfile中的use_frameworks!-导致fatal error: '..._plugin-Swift.h' file not found
  5. 之类的插件出错
  6. 我也尝试降低抖动的等级,因为上一个版本没有任何问题.但是运行flutter version v1.17.2会导致错误:

Error: ProcessException: Process exited abnormally:
error: unsupported sort specification 'creatordate'

我对此一无所知,因此我们非常感谢您为解决该问题提供的帮助

解决方案

*免责声明:

  1. 我对编程&编码和Flutter是我的第一门编程语言.但是经过三天的努力,我相信我已经修复了我的代码.希望这会有所帮助.如果这没有意义,请原谅.
  2. 其他新手阅读此文章:仅当您备份了脚本并且上述所有解决方案都对您失败时,才执行此操作.*

背景

我将Xcode升级到12.0.1时出现了问题.遇到相同的错误:

"Pods-Runner"目标具有传递性依赖关系,其中包括静态链接的二进制文件:

我相信在升级过程中,Flutter,可可豆荚和可可豆之间的某个未知链接断开了. Xcode.我不确定项目内部或平台内部是否发生了故障.因此,我启动了一个新的flutter项目,并确认了当那个全新的项目未能在Simulator上启动时是后者.

解决方案

我的解决方案是重新调整整个平台架构,而不是重新编写整个应用程序代码.

步骤1:备份您的代码(我没有;很幸运,或者对多次迭代和备份感到厌倦.)

步骤2:卸载Flutter(重新启动Mac),然后在VSCODE上重新安装Flutter

步骤3:完全卸载的Cocoa-pods&重新安装了Cocoapods.遵循此处中提到的步骤.. >

[现在在您的项目中] 步骤4:在终端中,键入"flutter clean"以清除为项目预先构建的所有缓存

第5步::删除(或重命名)"/ios"文件夹(至"/111ios"之类的其他名称)

步骤6:重新创建一个新的/ios文件夹.在终端中,输入

flutter创建-i swift

您可能需要为命令指定根PWD,才能在正确的目录中构建ios文件夹.

第7步:获取软件包

flutter pub get

第8步: Flutter Run.

以上使我的船再次航行.希望这对社区有所帮助!

After upgrading to flutter version 1.17.4 when running flutter build ios I get following output:

[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (.../ios/Flutter/Flutter.framework)

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/installer/xcode/target_validator.rb:74:in `each_key'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `verify_no_static_framework_transitive_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:590:in `validate_targets'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:158: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 running pod install

What I tried:

  1. Deleting ios/Flutter/Flutter.framework and running pod install as suggested here didn't help
  2. Adding s.static_framework = true to Flutter.podspec - no luck
  3. Deleting-recreating ios folder - no luck
  4. Commenting out use_frameworks! in Podfile - leads to errors in plugins like fatal error: '..._plugin-Swift.h' file not found
  5. I also tried to downgrade the flutter as I didn't have any problem with prev one. But running flutter version v1.17.2 resulted in error:

Error: ProcessException: Process exited abnormally:
error: unsupported sort specification 'creatordate'

I'm stuck with this, so any help to overcome the issue would be highly appreciated

解决方案

*Disclaimer:

  1. I'm quite new to programming & coding and Flutter is my first programming language. But having struggled with this for 3 days, I believe I have fixed my code. Hoping this helps. Please excuse if this doesn't make sense.
  2. Other Newbies reading this: Do this only if you have a backup of your script, and all of above solutions failed for you.*

Background

My problem occurred when I upgraded Xcode to 12.0.1. Got the same error:

The 'Pods-Runner' target has transitive dependencies that include statically linked binaries:

I believe in the upgrade process, some link in an unknown location broke between Flutter, Cocoa-pods & Xcode. I wasn't sure whether something broke internally within my project or within the platforms. Hence, I launched a new flutter project and confirmed it was the latter when that brand new project failed to launch on the Simulator.

Solution

My solution was to rejig the whole platform architecture, rather than re-writing the whole app code.

Step 1: Take a backup of your code (I didn't; got lucky or was just tired with the multiple iterations & backups.)

Step 2: Uninstalled Flutter (Restarted the Mac) and then Reinstalled Flutter on VSCODE

Step 3: Completely Uninstalled Cocoa-pods & Reinstalled Cocoapods. Followed the steps mentioned here.

[Now in your Project] Step 4: In the terminal, type 'flutter clean' to clean all caches pre-built for the project

Step 5: Delete (or Rename) '/ios' folder (to something else like '/111ios')

Step 6: Recreate a new /ios folder. In the terminal, type

flutter create -i swift

You might need to specify your root PWD for the command to build the ios folder in the right directory.

Step 7: Get packages

flutter pub get

Step 8: Flutter Run.

The above got my boat sailing again. Hopefully this helps the community!

这篇关于'Pods-Runner'目标具有传递依赖项,包括静态链接的二进制文件:(.../ios/Flutter/Flutter.framework)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆