My flutter doctor summary:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.2)
[✓] Connected device (2 available)
• No issues found!
My flutter doctor shows no issues. Can someone help me out with this? I tried flutter clean & other stuff & did not help. But app gets opened in the simulator if i create a new project but once i add dependencies it does not build.
Update:
When i run flutter run -v log i get this as error:
[ +47 ms] Target file "log" not found.
[ +3 ms]
#0 FlutterCommand.validateCommand
(package:flutter_tools/src/runner/flutter_command.dart:1420:9)
#1 RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:460:19)
#2 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:1248:11)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1140:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#6 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#9 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11 main (package:flutter_tools/executable.dart:94:3)
<asynchronous suspension>
[ +274 ms] ensureAnalyticsSent: 266ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
This is what I get at the end when i run my flutter run -v log.
I dont understand what to do here. Can someone help me out on this?
I have been stuck at this point since hours. When i run my app on my real device for android it gets built within a few mins but when i run it on my ios simulator, it keeps loading the "running Xcode build" for hours and gives no result. The same issue occurs on my android simulator where it gets stuck at "running Gradle task ‘assembleDebug’…"
2
Answers
I’ve faced the same issues earlier but only in the iOS simulator and I found 0 solutions for this. I used VS code, android was running perfectly but if I ran it on the simulator it took eternal time. I solved this with these steps.
First, flutter clean.
From the terminal, go to the iOS folder by this command >> cd ios.
pod install
if pod install is stuck in IDE terminal, then go to project finder location and enter into ios folder and open terminal and run pod install.
I solved my problem this way.
Currently, the Firestore iOS SDK depends on some 500k lines of mostly C++ code which can take upwards of 5 minutes to build in Xcode. To reduce build times significantly, you can use a pre-compiled version by adding 1 line to your ios/Podfile inside your Flutter project;
Add this line inside your target ‘Runner’ do block in your Podfile, e.g.:
Additionally, ensure that you have upgraded your cocoapods to 1.9.1 or higher:
gem install cocoapods
For more information see this issue: https://github.com/FirebaseExtended/flutterfire/issues/2751
Source: https://firebase.flutter.dev/docs/firestore/overview/#4-optional-improve-ios–macos-build-times