3

I have a already try multiple methods but failed,

FAILURE: Build failed with an exception.

  • Where: Script 'C:\Users\IMBA\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Users\IMBA\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • 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 16s Exception: Gradle task assembleDebug failed with exit code 1

give me a prefect suggestion

kiran Kshirsagar
  • 33
  • 1
  • 1
  • 3

3 Answers3

1

Update the packages in your project. Check if there is any package that needs to be updated.

I've update the package flutter_settings_ui: ^2.0.1 to latest and it solved the issues.

0
  1. Delete your pubspec.lock file
  2. go to your pubspec.yaml file and click on pub get now automatically generate file and fix your your.
Noyon
  • 97
  • 8
-1

You need this line:

import 'package:flutter/material.dart' show BuildContext, Key, MaterialApp, StatelessWidget, Widget, runApp;
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
  • Your answer could be improved by adding more information on what the code does and how it helps the OP. – Tyler2P Jun 05 '22 at 08:55