Flutter:升级Flutter版本后,错误“'Pods-Runner'目标具有名称冲突的框架”

vof42yt1  于 2023-03-31  发布在  Flutter
关注(0)|答案(4)|浏览(524)

我不能在我自己的iPhone上运行我的代码,在我将我的flutter项目从2. 23升级到2. 8并更新了所有的包之后,这是我几个月前工作的一个项目,现在有了一个新版本的flutter,所以我想最好保持我的SDK和包是最新的,但我得到了一个错误说Exception: Error running pod install当我试图在我的手机上测试它:(

错误如下:

[!] The 'Pods-Runner' target has frameworks with conflicting names: libavcodec.framework, libavdevice.framework, libavfilter.framework, libavformat.framework, libavutil.framework, libswresample.framework, libswscale.framework, gmp.framework, gnutls.framework, libhogweed.framework, libnettle.framework, mobileffmpeg.framework, lame.framework, libilbc.framework, libogg.framework, libopencore-amrnb.framework, libsndfile.framework, libvorbis.framework, libvorbisenc.framework, libvorbisfile.framework, opus.framework, shine.framework, soxr.framework, speex.framework, twolame.framework, vo-amrwbenc.framework, and wavpack.framework.
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:67:in `verify_no_duplicate_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:54:in `block (2 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:48:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:48:in `block in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:47:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:47:in `verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:597:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:163:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/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.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Exception: Error running pod install

我还尝试了一些流行的解决方案,如运行命令:

pod install --repo-update

我得到了同样的错误。
我的播客文件:

7rfyedvj

7rfyedvj1#

当我遇到这样的构建问题时,我会做三件事。首先确保停止程序的任何正在运行的示例,然后做这三件事。
1.删除(ios|机器人|腹板|马科斯|等)文件夹。无论哪个给你带来麻烦,删除该文件夹
1.从项目文件夹的根目录运行“flutter clean”
1.从项目文件夹的根目录运行“flutter create”。

cyej8jka

cyej8jka2#

看起来你的pod文件也包含old data,所以我建议你先分解pod,然后再分解reinstall

pod deintegrate // run this command to deintegrate

然后又是豆荚

pod install

在此过程之前和之后也执行flutter clean
如果上述解决方案不起作用,您也可以尝试以下步骤
首先,只需将您的IOS文件夹拖放到terminal
然后使用下面的命令清除pod文件该高速缓存

pod cache clean -all

在上述步骤之后,只需运行flutter cleanflutter pub get命令
最后你只要运行下面的command

pod install

让我知道它是否为你工作或不。

snz8szmq

snz8szmq3#

您的Podfile可能具有旧格式。
你可以尝试像这个例子一样格式化https://github.com/tanersener/flutter-ffmpeg/blob/master/example/ios/Podfile
或者
尝试在ios文件夹中运行pod install命令。
或者
试试flutter clean

a64a0gku

a64a0gku4#

将我的cocoapods降级到1.11.3版本…只是一个临时的修复

相关问题