5

I am new to flutter i have fresh installtion.

All as in docs.

As after fresh installation i was fine worked but when i want to work on another day flutter run i stuck.... I do not know why. I only make boilerplate app. I xcode when i build app is opening in simulator but stating as flutter run not working. I even try to wait 20 min with this flutter run but still stuck

flutter doctor -v

[✓] Flutter (Channel master, v1.6.4-pre.14, on Mac OS X 10.14.5 18F132, locale
    pl-PL)
    • Flutter version 1.6.4-pre.14 at /Users/db/Desktop/Mobile/flutter
    • Framework revision 81c38b22cb (32 hours ago), 2019-05-24 22:51:02 -0400
    • Engine revision 8dc3a4cde2
    • Dart version 2.3.2 (build 2.3.2-dev.0.0 e3edfd36b2)


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/db/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • CocoaPods version 1.7.0

[✓] iOS tools - develop for iOS devices
    • ios-deploy 1.9.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.3.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1343-b01)

[✓] Connected device (1 available)
    • iPhone 8 • F35EFD3E-C637-427A-8405-30EDF202939A • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!

flutter run -v stuck at this stage.

+file:///Users/db/Desktop/Mobile/flutter/packages/flutter/lib/widgets.d
art
[        ] -> +file:///Users/db/Desktop/Flutter/iamsmart/lib/main.dart
[        ] -> 35191e22-84d6-4fab-abef-178ae9e4c665 build/app.dill 0
[ +319 ms] Building bundle
[        ] Writing asset files to build/flutter_assets
[  +55 ms] Wrote build/flutter_assets
[  +12 ms] Using legacy Xcode build system.
[  +27 ms] executing: [/Users/db/Desktop/Flutter/iamsmart/ios/]
/usr/bin/xcodebuild -list
Exc
  • 1,473
  • 3
  • 15
  • 30

6 Answers6

5

Run this command

flutter clean

And then again

flutter run
CopsOnRoad
  • 237,138
  • 77
  • 654
  • 440
Lokesh Lalwani
  • 145
  • 1
  • 8
  • Hey I have upgraded to 1.7.8 and still have the same issue that flutter run takes sooo long to run on iOS simulator. But when i am flutter run on windows or mac android it is okey – Exc Jul 22 '19 at 11:35
  • Try to open your project in Xcode. You can do this by navigating to Project Folder > iOS> runner.xcworkspace. Now build your project and check if it gives an error – Lokesh Lalwani Jul 23 '19 at 12:17
  • Now run the app in any simulator using Xcode. If everything goes well then try to use VSCode, it should complete without any errors – Lokesh Lalwani Jul 24 '19 at 12:45
  • yeah i know that i can compile/buold app in xocde and runit on simulator but how to refresh/reload that simulator? as app started in xcode not in VScode with flutter run so 'r' will not work – Exc Jul 24 '19 at 12:50
  • Ensure that you have selected a team and checked on "Automatically manage signing", Also try to generate a new certificate. After that open VSCode and run your code – Lokesh Lalwani Jul 25 '19 at 03:33
  • You forgot flutter pub get step – Benyamin Jul 14 '23 at 15:48
2
  1. Try to upgrade your flutter version to v 1.7.8 by running this command this needs internet connection
    flutter upgrade
  1. Try this command
    flutter clean
  1. Change your flutter channel to stable
    flutter channel stable
  1. Check your internet connection because sometimes it prevents me from running my app
Uladz Kha
  • 2,154
  • 4
  • 40
  • 61
  • looks like maybe it fixed it but i will make more builds. and flutter runs to check, thanks – Exc Jul 12 '19 at 19:50
  • you should upvote my answer not to say thanks XD,wish you all the best – Abdelrahman M. Elmarakby Jul 13 '19 at 19:03
  • i am not saying it works...i know to upvote i need to tested more one or two builds are not proving anything.... – Exc Jul 14 '19 at 10:21
  • Hey I have upgraded to 1.7.8 and still have the same issue that flutter run takes sooo long to run on iOS simulator. But when i am flutter run on windows or mac android it is okey – Exc Jul 22 '19 at 11:35
1

Try to switch your flutter channel master to stable channel. After switching the channels you should call flutter upgrade to download the Flutter SDK and dependent packages.

Do this steps in the terminal

flutter channel stable

flutter upgrade

try to run your code after this steps.

Babken
  • 658
  • 1
  • 7
  • 17
  • Hey I have upgraded to 1.7.8 and still have the same issue that flutter run takes sooo long to run on iOS simulator. But when i am flutter run on windows or mac android it is okey – Exc Jul 22 '19 at 11:35
  • Is your provided information, in your question, the same ? Like error or ```flutter doctor -v``` information? If not, can you update your question pls. – Babken Jul 22 '19 at 13:13
1

Update to 1.9.1-hotfix4 fixed the problem

Exc
  • 1,473
  • 3
  • 15
  • 30
0

Your flutter doctor isn't showing any error as you had shared the commands.I think to share the run command terminal so that we can find out the stack of flowing of commands. If you are getting error to build flutter project then you should update the Android Studio or VS Code Editor. You can refer here: Android studio-https://developer.android.com/studio VS Code-https://code.visualstudio.com/Download

If you are able to create flutter project but doesn't getting run command then you need to update flutter and dart. You can refer here: Flutter-https://flutter.dev/docs/development/tools/sdk/releases Dart-https://dart.dev/get-dart

If still you are suffering from error then you need to share some more Pics.

Nitin0310
  • 19
  • 3
0

Probably something's gone wrong after you changed some files in of flutter ide. Also it does after updates crashed. So the thing you should do is firstly backup your projects if it indeed. After backup remove the ide and be sure uninstalling complate succesful. Restart your computer and install all decencies again. Because sometimes upgrading does not works well to get good result.

P.S : Dont forget using flutter doctor for checking if any problem comes out.