Rock
Rock

Reputation: 33

flutter run error flutter.gradle' line: 1035 with other AssetBundle? bundle error

suddenly the application no longer starts, 3 days ago I made a release with the same code I have not changed anything, I go to run it yesterday and I find myself with a lot of errors, which I can not solve. I have searched and tried to run the following options already:

- flutter clean
- flutter pub get
- flutter run --no-sound-null-safety
- flutter cache repair

they don't solve my problem, this is the result of flutter doctor -v:

[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version
10.0.19042.1466], local it-IT)
    • Flutter version 2.2.0 at C: \ Users \ Documents \ flutter
    • Framework revision b22742018b (9 months ago), 2021-05-14 19:12:57 -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C: \ Users \ AppData \ Local \ Android \ sdk
    • Android-31 platform, build-tools 30.0.3
    • Java binary at: C: \ Program Files \ Android \ Android Studio \ jre \ bin \ java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C: \ Program Files \ Google \ Chrome \ Application \ chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C: \ Program Files \ Android \ Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code, 64-bit edition (version 1.64.2)
    • VS Code at C: \ Program Files \ Microsoft VS Code
    • Flutter extension version 3.34.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.102
    • Edge (web) • edge • web-javascript • Microsoft Edge 96.0.1054.41

• No issues found!

but when I run flutter run, I find myself with these errors (I don't put them all, because there are so many):

/C:/Users/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/google_fonts-2.3.0/lib/google_fonts.dart:142265:7: Error: No named parameter with the name 'displayLarge'.

      displayLarge:

      ^^^^^^^^^^^^

/C:/Users/Documents/flutter/packages/flutter/lib/src/material/text_theme.dart:113:9: Context: Found this candidate, but the arguments don't match.

  const TextTheme({

        ^^^^^^^^^

/C:/Users/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lottie-1.2.2/lib/src/lottie.dart:48:5: Error: 'AssetBundle' isn't a type.

    AssetBundle? bundle,

    ^^^^^^^^^^^

/C:/Users/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/lottie-1.2.2/lib/src/lottie_builder.dart:137:5: Error: 'AssetBundle' isn't a type.

    AssetBundle? bundle,

    ^^^^^^^^^^^





FAILURE: Build failed with an exception.



* Where:

Script 'C:\Users\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035



* What went wrong:

Execution failed for task ':app:compileFlutterBuildDebug'.

> Process 'command 'C:\Users\Documents\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 54s
Running Gradle task 'assembleDebug'...                             55,2s
Exception: Gradle task assembleDebug failed with exit code 1

do you know how to resolve the matter? it looks like a cache issue, but i tried to re-install flutter with the same version, but i didn't fix anything

this is my pubspec.yaml

version: 1.2.13+73

environment:
  sdk: ^2.7.0
  flutter: ^1.26.1

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  audioplayers: ^0.19.1
  autocomplete_textfield: ^1.7.3
  expansion_card: ^0.1.0
  barcode_scan2: ^4.1.3
  blue_print_pos: ^0.0.5
  cool_alert: any
  device_info: ^2.0.0
  flutter_config: ^1.0.8
  flutter_credit_card: ^2.0.0
  flutter_html: any
  flutter_phoenix: ^0.1.0
  flutter_riverpod: ^0.14.0+3
  flutter_search_bar: ^2.1.0
  flutter_stripe: ^1.0.1+3
  flutter_user_agent: ^1.2.2
  google_fonts: ^2.1.0
  in_app_review: any
  menu_button: ^1.2.1
  package_info: ^0.4.3+2
  pay: ^1.0.2
  permission_handler: ^4.0.0
  qr_flutter: ^4.0.0
  rflutter_alert: ^2.0.2
  share: ">=0.6.5+4 <2.0.0"
  shared_preferences: ^2.0.5
  sizer: ^1.1.8
  tinycolor: ^1.0.3
  url_launcher: any
  vibration: ^1.7.3
  wakelock: ^0.4.0
  chewie: any

dev_dependencies:
  flutter_test:
    sdk: flutter
  http: ^0.13.3

flutter:
  assets:
    - assets/
    - assets/audio/cancel.mp3
    - assets/audio/invio.mp3
    - assets/audio/moltiplica.mp3
    - assets/audio/reparto.mp3
    - assets/audio/ricevuta.mp3
    - assets/audio/tastiera.mp3
    - assets/audio/beep.mp3
  fonts:
    - family: CustomIcon
      fonts:
        - asset: assets/fonts/CustomIcon.ttf

Upvotes: 1

Views: 673

Answers (3)

Omar Essam El-Din
Omar Essam El-Din

Reputation: 1873

You have to upgrade your flutter SDK

Upvotes: 0

ImanX
ImanX

Reputation: 816

Please try to remove sign ^ of version dependency.

Upvotes: 1

ImanX
ImanX

Reputation: 816

I recently faced out issue I tried to downgrade flutter so resolved it.

Upvotes: 0

Related Questions