Flutter iOS build failed an error of pod files: Podfile is out of date

前端 未结 8 526
猫巷女王i
猫巷女王i 2021-01-07 18:48

I\'m trying to build my app on the ios simulator(ios 13), but the build fails and gives an error of pod files: Podfile is out of date

This is the error.



        
相关标签:
8条回答
  • 2021-01-07 19:26

    I'm not sure if this will work for everyone but my issue was fixed by running flutter run from the terminal.

    I was just using the Flutter launcher from vscode and it kept throwing errors.

    I had a Podfile already setup but I think flutter run maybe updated it or reinstantiated it? I'm unsure.

    My issue was caused from an update to Flutter

    0 讨论(0)
  • 2021-01-07 19:32

    Use pod install command in your ios directory to install new pods in your project. Even if you already have a Podfile and ran pod install before. This should work for you. I ran into the same problem some time ago and this is how it was solved.

    0 讨论(0)
  • 2021-01-07 19:33

    This happens to most of times when i update the flutter SDK, But don't skip updating to make it better and easier because it is very easy to solve

    It is necessary to fix - Removing contents of Pods folder will solve the issue, Here is the process of how to do this

    1. To completely clean(Removing all points to links) and create upgraded to the new(uninstall and installing again too), Write following command

      flutter clean
      rm -Rf ios/Pods
      rm -Rf ios/.symlinks
      rm -Rf ios/Flutter/Flutter.framework
      rm -Rf ios/Flutter/Flutter.podspec
      
    2. Then for reproduce Podfile follow this command

      rm ios/Podfile
      
    3. Finally your project is ready to good to go

      flutter run
      
    0 讨论(0)
  • 2021-01-07 19:40

    Suggestion after running flutter clean

    pod install --verbose
    

    run pod install --verbose because if you use cloud_firestore pod instlal might download gRPC-Core [https://github.com/grpc/grpc.git] which is ~200MB but because of it's git submodules it will end up downloading 1GB. So to see progress of what is goin on run

    0 讨论(0)
  • 2021-01-07 19:44

    This mostly happens when you upgrade your flutter application, to solve this issue follow bellow steps

    1. Go to Your_Project_Directory/ios/ and remove Podfile or you can do it by running the following command in the root project directory

      rm ios/Podfile
      
    2. Run your project again, this will create a new and updated Podfile for you

      flutter run
      
    0 讨论(0)
  • 2021-01-07 19:45

    Just in case, if someone runs into a problem similar to this output after updating the Podfile:

      ld: framework not found intent
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        note: Using new build system
        note: Building targets in parallel
        note: Planning build
        note: Constructing build description
    

    You can try this:

    1. Go to Xcode Select your target.
    2. Go to Build Settings.
    3. Search the package name shown in the error. e. g. : framework not found intent.
    4. You will see that there is a section like: "Linking"->"Other linker flags" ,then click the bold part of this row.
    5. It will open a dialog box where you can remove the framework not found.
    6. When removing the framework name, also remove the "-framework" tag.

    This may be related to packages that only work in Android.

    0 讨论(0)
提交回复
热议问题