A very common problem when developing applications in Flutter is that, when running in an Android project, it stops responding and gets stuck; for this, we have the following commands:
Open your flutter project folder.
- Change directory to the android directory in your flutter project directory cd android
- Clean gradle: ./gradlew clean
- Compile gradle ./gradlew build
- Or you can combine both commands with just ./gradlew clean build
- Now run your flutter project. If you are using vscode, press F5. The first time gradle runs assembleDebug it will take time.
This command gives a lot of information about whether there are any missing configurations, packages, etc about your project; so, in case the execution fails, you must be aware of possible errors that it throws.
Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter