Reputation: 303
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:
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
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
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
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