简体   繁体   中英

how to run flutter app without taking so long?

well I'm new to flutter. I see that everytime I try to run the application it takes so long to update and show me the result, Although I'm using an emulator. I guess it is because of GRADLE. is there any way to minimize the wasted time?

Usually, the first time you run the application with flutter run , it takes a while to build the application.

From there, you can see your changes if you press lowercase r (hot reload) instantly. If you press uppercase R (hot restart), the application will restart instantly as well.

An actual rerun with flutter run is rarely needed, only if you add new packages to your app.

Based on my personal experience, Flutter is rather demanding on your machine, make sure you have the right hardware.

I had a 8 gb of RAM and mechanical hard disk drive (HDD). The Gradle build would 15+ minutes.

I replaced my HDD with a Solid State Drive (SSD). And added an additional 8gb of RAM. Now the gradle build takes around 1 min.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM