CocoaPods не может найти совместимые версии для модуля «Firebase / Core» | cloud_firestore, Flutter

У меня проблемы с модулем, см. Ниже

Запуск lib / main.dart на iPhone X в режиме отладки ... Запуск установки модуля ... Вывод CocoaPods: ↳ Подготовка

Analyzing dependencies

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

Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`

Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Core

Specs satisfying the `Firebase/Core` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Core was resolved to 5.8.0, which depends on
        FirebaseAnalytics (= 5.1.2) was resolved to 5.1.2, which depends on
          GoogleUtilities/MethodSwizzler (~> 5.2.0)

Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "gRPC-Core":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Firestore was resolved to 5.8.0, which depends on
        FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on
          gRPC-C++ (~> 0.0.3) was resolved to 0.0.3, which depends on
            gRPC-C++/Implementation (= 0.0.3) was resolved to 0.0.3, which depends on
              gRPC-Core (= 1.14.0)

    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on
      Firebase/Firestore was resolved to 5.8.0, which depends on
        FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on
          gRPC-ProtoRPC (~> 1.0) was resolved to 1.14.1, which depends on
            gRPC-ProtoRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on
              gRPC (= 1.14.1) was resolved to 1.14.1, which depends on
                gRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on
                  gRPC-Core (= 1.14.1)

/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/resolver.rb:123:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:781:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:779:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:88:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

Вывод ошибок из CocoaPods: ↳ [33mВНИМАНИЕ: CocoaPods требует, чтобы ваш терминал использовал кодировку UTF-8. Рассмотрите возможность добавления следующего в ~ / .profile:

    export LANG=en_US.UTF-8
    [0m

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

Ошибка при запуске установки модуля Ошибка при запуске приложения на iPhone X.


person Jashan PJ    schedule 19.09.2018    source источник
comment
Здесь та же проблема, решения нет ....   -  person Bruno    schedule 19.09.2018
comment
Я не нашел никакого решения для вышеупомянутой проблемы, но понижение флаттера до старого, который dart 1 и cloud_firestore 7.4 позволит избежать этих проблем. Но выскакивает другое ... например, вот эта "серьезная ошибка:" файл GoogleUtilities / GULAppEnvironmentUtil.h не найден #import ‹GoogleUtilities / GULAppEnvironmentUtil.h› ^ ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ '   -  person Jashan PJ    schedule 20.09.2018


Ответы (8)


Моя настройка: VS Code, Flutter

Если у вас нет Podfile.lock файла и pod update не помогает, попробуйте следующее:

  1. Перейдите в каталог ios/Pods/Local Podspevs в вашем проекте
  2. Проверьте каждый json файл, чтобы найти самую высокую требуемую версию ios. В некоторых из них у меня было "ios": "10.0"
  3. Вернуться в каталог ios/
  4. Открыть Podfile файл
  5. Uncomment # platform :ios, '9.0' and replace 9.0 with version from 2. step, for example 10.0.
    • # platform :ios, '9.0' > platform :ios, '10.0'
  6. Запустите pod install, ошибка должна исчезнуть
person Preckrasno    schedule 20.01.2021
comment
Да, я тоже это сделал, сработало. Я думаю, что команде flutterfire нужно исправить свои опасные зависимости - person Shazamo Morebucks; 20.01.2021
comment
согласен @ShazamoMorebucks, это очень громоздко, я считаю, что комментарии технического руководителя на YouTube относительно Flutter имеют много достоинств. Я не считаю Flutter долгосрочным решением, поскольку он в корне сломан с таким количеством проблем, которые никогда не исправляются. - person Modesto Cabrera; 21.02.2021
comment
Важно не забыть раскомментировать строку # platform :ios, '9.0', поскольку она прокомментирована по умолчанию, и это может быть не сразу видно. - person Renaud Tarnec; 09.04.2021
comment
Это раствор обезболивающего для меня. Спасибо. - person Utku; 17.04.2021
comment
это сработало! Спасибо! - person Demian S; 13.05.2021
comment
Легенда. Большое спасибо - person Neo; 17.05.2021
comment
Это работает для меня, но мне просто нужно раскомментировать платформу в первом подфайле и увеличить минимальную платформу до 11.0, не нужно заходить в каждую локальную спецификацию подфайла. - person Chen Li Yong; 25.05.2021
comment
Почему это еще не помечено как ответ? - person xwaxes; 02.06.2021
comment
Чтобы получить номера версий из всех файлов json, выполните следующую команду: find ios / Pods / Local \ Podspecs / -name \ *. Json -exec jq -r '.platforms.ios' {} \; | sort -un - person Phill Z; 19.06.2021

pod update

Должен сделать свое дело. Пожалуйста :-)

person Fahad S. Ali    schedule 20.09.2018
comment
Я получаю эту ошибку: Анализ зависимостей [!] CocoaPods не может найти совместимые версии для pod - person Raz; 11.06.2019
comment
Тем не менее, это обновит все ваши поды, чего вы, возможно, не захотите. Я думаю, что решение Random Code Money лучше. В основном очистите кеш Cocoapod из проекта и переустановите. - person Michael Rose; 27.02.2020
comment
Просто для уточнения. При использовании Android Studio - ›Нажмите Терминал -› cd ios - ›pod update - person ymerdrengene; 14.09.2020

Эта проблема может возникнуть, когда вы обновляете пакеты FlutterFire и пытаетесь выполнить сборку для iOS или macOS, обычно это связано с одним из следующих:

Вот какая-то причина и их решение

  1. ОСОБЕННОСТЬ: переадресация порта на firebase-ios-sdk v7.3.0.
  • Из-за этого обновления SDK iOS 10 теперь является минимальной версией, поддерживаемой FlutterFire. Обновите целевую версию сборки.

    Решение:

    Перейдите к файлу ios/Podfile внутри вашего проекта и раскомментируйте

    # platform :ios, '9.0'
    

    Затем поменяйте версию на 10

    platform :ios, '10.0'
    

    И вернитесь в каталог ios /, запустите pod install в своем терминале и повторите попытку сборки.

  1. Ваша Podfile.lock версия в каталоге iOS или macOS устарела и заблокирована для более старых версий SDK Firebase для iOS, тогда как недавно обновленные пакеты FlutterFire могут использовать более новые версии этих SDK.

    Решение: удалите файл Podfile.lock и повторите попытку сборки. Этот файл будет восстановлен после следующего pod install.

  2. Репозиторий со спецификациями модулей устарел, что означает, что CocoaPods локально не знает о каких-либо потенциально новых версиях SDK Firebase для iOS, которые были недавно опубликованы.

    Решение: вернитесь в каталог ios /, запустите pod repo update в своем терминале и повторите попытку сборки.

person Paresh Mangukiya    schedule 27.11.2020

У меня похожая проблема. Установите Project, Target и Podfile на iOS 12 и получите ошибку.

Вот мой подфайл:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
use_frameworks!

abstract_target 'all_pods' do
    pod 'Alamofire'
    pod 'AlamofireImage'
    pod 'AlamofireNetworkActivityIndicator'
    pod 'Atributika'
    pod 'AXPhotoViewer'
    pod 'Cache'
    pod 'Crashlytics'
    pod 'Fabric'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'Google-Mobile-Ads-SDK'
    pod 'GTMNSStringHTMLAdditions'
    pod 'KVLoading'
    pod 'MGSwipeTableCell'
    pod 'ReachabilitySwift'
    pod 'SDCAlertView'
    pod 'SideMenuSwift'
    pod 'SwiftyJSON'
    pod 'SwiftyUserDefaults'
    pod 'UIImageViewAlignedSwift'

target 'Test Poject' do
#    all_pods
end

end

Чтобы убедиться, сначала деинтегрируйте

стручок деинтегрировать

Запустить принудительное обновление репо

pod install --repo-update

Updating local specs repositories
$ /usr/bin/git -C /Users/XYZ/.cocoapods/repos/master fetch origin --progress
  remote: Counting objects: 9, done.        
  remote: Compressing objects: 100% (9/9), done.        
  remote: Total 9 (delta 6), reused 0 (delta 0), pack-reused 0        
  From https://github.com/CocoaPods/Specs
     8b2bcbd42ee..f72b5a3a02a  master     -> origin/master
  $ /usr/bin/git -C /Users/XYZ/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/bin/git -C /Users/XYZ/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at f72b5a3a02a [Add] DSJSONSchemaValidation 2.0.4

CocoaPods 1.6.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.6.0.beta.1

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
  In Podfile:
    Firebase/Core

Specs satisfying the `Firebase/Core` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
  In Podfile:
    Firebase/Core was resolved to 5.8.0, which depends on
      FirebaseAnalytics (= 5.1.2) was resolved to 5.1.2, which depends on
        GoogleUtilities/MethodSwizzler (~> 5.2.0)

Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.
person Random Code Monkey    schedule 19.09.2018
comment
Обновить Я заставил это работать, добавив эту строку в свой Podfile: pod 'Firebase', '~ ›5.7' - person Random Code Monkey; 19.09.2018

только в pod-файле UnComment

# platform :ios, '9.0'

и пополните его platform :ios, '10.0'

затем удалите Podfile.lock и переустановите приложение

person PesaCoder    schedule 16.04.2021
comment
Да! это сработало. Это сэкономило мне много времени - person jaspreet Singh; 21.06.2021

У меня была такая же проблема, но это мне помогло.

pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'

Он обновит FirebaseCore и FirebaseCrashlytics до последних версий.

person Gurjinder Singh    schedule 12.01.2021

У меня была аналогичная проблема с firebase Admob, и моя проблема заключалась в том, что я использовал пакеты admob_flutter и firebase_admob. Как только я удалил пакет admob_flutter из pubspec.yaml, все заработало отлично!

person JIJO J    schedule 10.02.2021

Cocoapods отказывается обновляться до последней версии Firebase, поскольку для зависимости требуется более высокая минимальная цель развертывания.

Вам нужно будет либо обновить цель развертывания собственного приложения, либо использовать более старую версию firebase SDK.

person chris stamper    schedule 19.09.2018