Ali ÜSTÜNEL
Ali ÜSTÜNEL

Reputation: 303

Flutter Project Launch Issue with VsCode

I use my phone as an emulator while developing applications with Flutter. After updating to the Flutter 2 version, Web Folder added to Flutter file directory, I know that. but i can't run the project

Here I started the classic flutter counter app and the result:

enter image description here

Launching lib\main.dart on MI 5 in debug mode...
lib\main.dart:1
Exception: Gradle task assembleDebug failed with exit code -1
Exited (sigterm)

I searched for a solution on the internet but could not solve this stupid error

how can i solve this problem?

Upvotes: 1

Views: 2302

Answers (3)

adrsh23
adrsh23

Reputation: 260

I'm not sure but, Try changing minSdkVersion from 16 to 21

You can find this property in ./android/app/build.gradle

Then do a flutter clean and run the project

If this does not work there might be issue with the emulator or the flutter version.

Upvotes: 0

Ali ÜSTÜNEL
Ali ÜSTÜNEL

Reputation: 303

if I use flutter run command from terminal

Launching lib\main.dart on MI 5 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        76,3s
Exception: Gradle task assembleDebug failed with exit code -1

Upvotes: 0

Athul A
Athul A

Reputation: 205

Connect to Internet run flutter clean then flutter pub get then flutter run .

This might help, try it out. This error usually comes when some files are pending download or so.

Upvotes: 1

Related Questions