Flutter 'Ошибка запуска pod install' 'Pods-Runner' target имеет транзитивные зависимости - PullRequest
0 голосов
/ 28 сентября 2019

При попытке запустить проект flutter я получаю: «Ошибка при запуске pod install» (я видел другой пост, очень похожий [https://github.com/flutter/flutter/issues/11856], но я не уверен, что у меня возникла та же проблема.)

Я пишу код Dart с Flutter на MacOS Mojave версии 10.14.6.

Я пробовал: flutter clean flutter doctor flutter upgrade flutter precache ... flutter run Iпробовал каждую команду флаттера в каждой возможной комбинации указанных команд, но все равно получал ту же ошибку.

доктор флаттера:

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 perfomed 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 и rubygems.

Я думаю, что это как-то связано с одной из следующих установок:

-> 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

Не уверен, что еще я могусделать, чтобы получить лучшее сообщение об ошибке ...

...