I cannot run my code on my own iPhone, after I upgraded my flutter project from 2.23 to 2.8 and updated all the packages, this is a project that I worked on a few months ago, and now there is a new version of flutter, so I thought it would be better to keep my SDK and the packages up to date, but I got an error saying Exception: Error running pod install
when I'm trying to test it on my phone :(
Here is the error:
[!] 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
I had also tried some popular solutions on the web such as running the command:
pod install --repo-update
But I got the same error.
It seems that your
pod
file containsold data
as well so for this I'll suggest you to deintegrate pod first thenreinstall
itthen isntall the pod again
also perform
flutter clean
before after this processIf the above solutions doesn't work you may try these steps as well
first of all just drag and drop your IOS folder into the
terminal
then clear the cache of the pod file using below command
after the above steps just run
flutter clean
andflutter pub get
commandand finally you just run the below
command
Let me know whether it works for you or not.