Home > Software engineering >  Script 'D:\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
Script 'D:\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

Time:10-18

hello i was using my app normaly then when I decide to run it again it showed me this error and I tried every solution in internet but it didn't solve my problem

Launching lib\main.dart on SM N976N in debug mode...
FAILURE: Build failed with an exception.

* Where:
Script 'D:\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\flutter\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 25s
Running Gradle task 'assembleDebug'...                             29,9s
Exception: Gradle task assembleDebug failed with exit code 1

CodePudding user response:

Please elaborate yours issue. First share screenshot of the error or screenshot of pubspec.yml. If not go to terminal on yours IDE and use:

flutter clean

flutter pub get

flutter pub upgrade

and rebuild the app. If problem still exist please let me know.

CodePudding user response:

this is the showen error

    name: flutter_ui
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0 1

environment:
  sdk: '>=2.18.2 <3.0.0'

dependencies:
  flutter:
    sdk: flutter



  cupertino_icons: ^1.0.2
  syncfusion_flutter_datepicker: ^20.3.48
  simple_animations: ^5.0.0 2
  firebase_auth: ^3.11.2
  cloud_firestore: ^3.5.1
  firebase_core: ^1.24.0
  flutter_svg: ^1.1.5
  curved_navigation_bar: ^1.0.3
  barcode_widget: ^2.0.1
  flutter_qr_bar_scanner: ^3.0.2
  flutter_cache_manager: ^3.3.0
  firebase_database: ^9.1.7
  firebase_storage: ^10.3.11
  qr_flutter: ^4.0.0
  path_provider: ^2.0.11
  path_provider_ios: ^2.0.11
  path_provider_android: ^2.0.20

dev_dependencies:
  flutter_test:
    sdk: flutter


  flutter_lints: ^2.0.0



# The following section is specific to Flutter packages.
flutter:


  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - images/
  #   - images/a_dot_ham.jpeg


  fonts:
    - family: Poppins
      fonts:
        - asset: fonts/Poppins-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
  • Related