Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter 'Error running pod install' 'Pods-Runner' target has transitive dependencies

When trying to run my flutter project I get:

Error running pod install

(I saw another very similar post but I'm not sure if I'm having the same issue.)

I'm writing Dart code with Flutter on macOS Mojave version 10.14.6.

I've tried:

  • flutter clean
  • flutter doctor
  • flutter upgrade
  • `flutter precache
  • flutter run

I've tried every flutter command in every possible combination of said commands, but still get the same error.

flutter doctor:

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!

flutter run:

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

I also updated a bunch of different programs like cocoapods and rubygems.

I think it has something to do with one of these installations:

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

Because it uses the versions in my pubspec.yaml, then just start using 0.0.1 for some reason.

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

Not sure what else I can do to get a better error message...

like image 458
William Nesham Avatar asked Sep 28 '19 02:09

William Nesham


3 Answers

You can see the error in the message

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

So, go to the file ios/Podfile inside your project, find there the line

# platform :ios, '9.0'

and uncomment it.

After that delete ios/Podfile.lock file and run project again (or pod update)

like image 93
awaik Avatar answered Nov 20 '22 03:11

awaik


  1. cd ios/
  2. rm Podfile.lock
  3. pod install
  4. pod repo update
like image 34
Lucas Santos Avatar answered Nov 20 '22 01:11

Lucas Santos


run this code on the terminal

sudo arch -x86_64 gem install ffi

Next, go to the ios folder in your project, and open Podfile.

find there the line

#platform :ios, '9.0'

remove the # and change the 9.0 to 10.0, and the final code should be like the below

platform :ios, '10.0'
like image 1
Faxriddin Abdullayev Avatar answered Nov 20 '22 03:11

Faxriddin Abdullayev