How to solve “error running pod install” in flutter on mac?

前端 未结 4 2276
粉色の甜心
粉色の甜心 2021-02-19 15:11

I have an error when I tried to launch my project on my iPhone, the basic Flutter example is working on my iPhone but when I use my project I have this error.

相关标签:
4条回答
  • 2021-02-19 15:31

    In Flutter project, I Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version.

    Solution:-

    • flutter clean
    • rm -Rf ios/Pods
    • rm -Rf ios/.symlinks
    • rm -Rf ios/Flutter/Flutter.framework
    • rm -Rf ios/Flutter/Flutter.podspec
    • cd ios
    • pod install
    • cd ..
    • flutter build ios
    • flutter run
    0 讨论(0)
  • 2021-02-19 15:34

    This happens when we change any plugins versions or flutter pub package.

    I was getting a similar error, so I used many different things but still nothing happened but finally I got an exact solution For the solution follow the below steps

    1. Delete the podfile.lock file from the ios folder.

    2. Open the terminal, go to the ios folder directory and run pod install. It could take some time to install.

      If pod install gives any error then try this

      pod install --repo-update 
      
    3. After everything is done run your project again

      flutter run
      

    Ref:- Running pod install

    0 讨论(0)
  • 2021-02-19 15:38

    I faced the same issue and none of the above work. Finally I resolved it by:

    1. Check ios/.symlinks/plugins contains extra plugin which you are not using.
    2. Delete podfile.lock in ios folder, if it exists.
    3. Delete podfile from ios folder.
    4. Delete pods folder in ios directory.
    5. Run flutter clean in the terminal.
    6. Run flutter pub get in the terminal.
    7. Run flutter runin the terminal.
    0 讨论(0)
  • 2021-02-19 15:52

    Hope this help 1. change directory to your project e.g /dart/apps/abc 2. type, 'flutter clean && pod update'

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