I have installed flutter and Visual studio code and followed all the steps. I created a new flutter project and tried running it. However, it does not run either in the phone and will not launch the browser either. Here is the output when the project is created:
[flutter_application_1] flutter create --template app --overwrite . Creating project .... Resolving dependencies... Got dependencies. Wrote 129 files.
All done! You can find general documentation for Flutter at: https://docs.flutter.dev/ Detailed API documentation is available at: https://api.flutter.dev/ If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd . $ flutter run
Your application code is in .\lib\main.dart.
exit code 3221225501
Here is the output when trying to launch on the phone.
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'F:\f\bin\flutter.bat'' finished with non-zero exit value -1073741795
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 48s Running Gradle task 'assembleDebug'...
And this is what happens when I try to run it in a browser and it will not launch the browser:
flutter run -d Chrome Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome...
PS: I have tried out using Android Studio as well. It did not work there as well. On Android Studio I get a project creation error. Have asked about it here. However, If i restart android studio it does run the web app but with regards to the android App I get the same error as above.
Источник: https://stackoverflow.com/questions/781 ... tudio-code
Мобильная версия