TheAlphamerc/flutter_ecommerce_app

Error: No named parameter with the name 'display4'

Lakhankumawat opened this issue · 8 comments

Describe the bug
When i run the app following error is thrown and build fails with exit code 1.

Launching lib\main.dart on RMX1851 in debug mode...
Running Gradle task 'assembleDebug'...
/D:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/google_fonts-0.3.9/lib/google_fonts.dart:109:7: Error: No named parameter with the name 'display4'.
      display4: GoogleFonts.aBeeZee(textStyle: textTheme?.display4),
      ^^^^^^^^


FAILURE: Build failed with an exception.

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

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

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo https://github.com/TheAlphamerc/flutter_ecommerce_app.git
  2. Click on 'pub get'
  3. Run
  4. See error

Expected behavior
App was expected to be build

Screenshots

sas

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

flutter doctor

F:\flutter_ecommerce_app>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
 Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19043.1151], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.60.1)
[√] Connected device (3 available)

• No issues found!

flutter doctor verbose

F:\Fluttter Apps\customer>flutter doctor -v
[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Version 10.0.19043.1151], locale en-US)
    • Flutter version 2.5.0 at D:\src\flutter\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cc385b4b8 (13 days ago), 2021-09-07 23:01:49 -0700
    • Engine revision f0826da7ef
    • Dart version 2.14.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\LAKHN KUMAWAT\AppData\Local\Android\sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

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

[√] Android Studio (version 2020.3)
    • 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 11.0.10+0-b96-7249189)

[√] VS Code (version 1.60.1)
    • VS Code at C:\Users\LAKHN KUMAWAT\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
    • RMX1851 (mobile) • 4e5981a2 • android-arm64  • Android 11 (API 30)
    • Chrome (web)     • chrome   • web-javascript • Google Chrome 93.0.4577.82
    • Edge (web)       • edge     • web-javascript • Microsoft Edge 93.0.961.47

• No issues found!

flutter version

F:\flutter_ecommerce_app>flutter --version
Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cc385b4b8 (9 days ago) • 2021-09-07 23:01:49 -0700
Engine • revision f0826da7ef
Tools • Dart 2.14.0

PS - I cloned the repo today itself for first time

I have the same issue.

The issue was occurring due to the use an incompatible version of google font library with new flutter version. I have upgraded the version of the package and now it is working fine.

Ok I will have a look , thanks

The issue was occurring due to the use an incompatible version of google font library with new flutter version. I have upgraded the version of the package and now it is working fine.

how like for me its still not working

@aryant-nigam Which version of flutter you are using ?

Using google_fonts: 2.2.0 without '^'fixed for me.

The issue was occurring due to the use an incompatible version of google font library with new flutter version. I have upgraded the version of the package and now it is working fine.

You did not updated in your flutter package here is it creating issue
https://pub.dev/packages/flutter_ecommerce_app/versions