Flutter build failed after adding dependency

4,560

Solution 1

This helped me:

Go to ios dir and type pod install

Reference: https://github.com/X-Wei/flutter_catalog/issues/26#issuecomment-548923989

Solution 2

Maybe there is a missing dependency

In order to fix, you need to get the packages and install the pods.

  1. Open the terminal, navigate to the project and type
  2. flutter clean
  3. flutter pub get
  4. Run pod install

Solution 3

add

path_provider: 1.6.1 

to pubspec.yaml and then then

flutter pub get
Share:
4,560
mr.boris
Author by

mr.boris

Updated on December 14, 2022

Comments

  • mr.boris
    mr.boris over 1 year

    Build fails after I've tried to install flutter_statusbarcolor package. Everything was ok before I did it, I am using Mac and XCode simulator. I just want to change color of status bar. This approach doesn't work.

    $ flutter run
    Launching lib/main.dart on iPhone Xʀ in debug mode...
    Running Xcode build...                                                  
    Xcode build done.                                            1,3s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
        note: Using new build systemnote: Planning buildnote: Constructing build descriptionerror: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file
        'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error:
        /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target
        'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support
        Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find
        included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')error:
        /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target
        'Runner' from project 'Runner')error: /Users/Bob/Documents/Projects/Flutter/gp/ios/Flutter/Debug.xcconfig:1: could not find included file 'Pods/Target Support
        Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
    
    Could not build the application for the simulator.
    Error launching application on iPhone Xʀ.
    

    Then I removed this package from dependencies and all files in ~/.pub-cache/hosted/pub.dartlang.org/ directory. But Flutter still throws the same error. How to restore my app and change color for status bar natively?

    • hio
      hio over 4 years
      which version of dependence do you use?
    • mr.boris
      mr.boris over 4 years
      As it mensioned in pub.dev flutter_statusbarcolor: ^0.2.2
    • hio
      hio over 4 years
      try with older version like 0.2.0