1

im having trouble building my flutter project on my mac M1. When i try launching it in android studio im getting the error code 'error running pod install' and when i try opening it in xcode im getting 'module cloud_firestore not found'.

I have tried all the solutions in this thread How to solve "error running pod install" in flutter on mac? but nothing seems to work.

Im having no troble building flutter project without any dependencies but as soon as i add one im getting the error messages mentioned above, any ideas on how i could solve this?

  • Does this answer your question? [Pods error trying to build Expo managed workflow app on SDK 45 using EAS build](https://stackoverflow.com/questions/72200966/pods-error-trying-to-build-expo-managed-workflow-app-on-sdk-45-using-eas-build) – Can O' Spam May 11 '22 at 16:28
  • Dlete pod lock file then run command update pod from your terminal – Tech Nerd May 11 '22 at 17:20

2 Answers2

0

I came to this problem as well (Macbook Air M1). I also tried the solution on your mentioned link but failed. However, finally I could solve the problem by following the steps on 'Deploy to iOS Device'

https://docs.flutter.dev/get-started/install/macos#install-xcode

  1. Run this code on Terminal

    $ sudo gem install cocoapods

    $ sudo gem install ffi -- --enable-libffi-alloc

  2. Restart Android Studio

0
I run into these problems all the time on my M1 Pro. They come and go, and you will probably need to do it lots of times.

You need to do the following:

  1. open terminal
  2. run 'Flutter clean'.
  3. run 'Flutter pub get'.
  4. run 'cd ios' (extra: this makes your terminal go into your ios folder in terminal).
  5. run 'arch -x86_64 pod install' (extra: since m1 is ARM-processor, it does not allow just "pod install", which the error messages hints to do).
  6. just run the app like normal. (extra: it will take 6 minutes to start up now, but it is only the first time after these steps).

Hope this helps. I see it was posted some time ago, so i assume/hope you found a solution.