No such module 'Flutter'

Viewed 14098

I have published my app in TestFlight but it is crashing while startup. When I view crash logs, it say “No such module 'Flutter’”. I do know how to fix.

Thanks in Advance  Crash Report

5 Answers

This apparently a bug in XCode 13.1.

It is claimed by Flutter team to be a bug with the visual component of XCode... as evidenced by the fact that the project will still build and run from XCode.

There are many reported ways to get rid of it temporarily, such as doing Product\build , Product\Clean Build Folder, or running the project on IOS from within Android Studio...

But these are only temporary and the problem will reappear.

https://github.com/flutter/flutter/issues/92337

Open IOS Folder in terminal , write

pod install

then

pod update

then it will work

i just removed Podfile.lock and Pods folder then run pod install

Just did like @Tasnuva said, and it worked in my case:

  1. Remove podfile.lock file and Pods folder
  2. Run pod install then pod update
  3. Reopen Runner.xcworkspace
  4. No such module Flutter still exist, just ignore and run as usual
  5. No such module flutter suddenly disappear after build succeed

In my case it was me not putting

install_all_flutter_pods(flutter_application_path)

in the Podfile for target 'my_app'

I added it for the testing target but not the project...

than pod install

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'my_app' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for counter_app
  flutter_application_path = '../flutter_project'
  load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
  install_all_flutter_pods(flutter_application_path)

  target 'my_appTests' do
    inherit! :search_paths
    # Pods for testing
    install_all_flutter_pods(flutter_application_path)
  end

  target 'my_appUITests' do
    # Pods for testing
    install_all_flutter_pods(flutter_application_path)
  end

end

Related