skip to Main Content

I am creating an application in flutter and everything was going well, but at the moment it started giving me an error. It won’t let me compile and flutter pub upgrade and flutter pub outdated don’t work, but flutter pub get if it works fine.

I am new to flutter and I will not understand most of the things they tell me, please, if you can explain me as detailed as possible I would appreciate it

Flutter –no-color build apk
C:srcflutterbinflutter.bat –no-color build apk

Building with sound null safety

Running Gradle task 'assembleRelease'...
/C:/Users/LEO/AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-2.3.3/lib/src/google_fonts_base.dart:14:1: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
import 'asset_manifest.dart';
^^^^^^^^^^^^^
/C:/Users/LEO/AppData/Local/Pub/Cache/hosted/pub.dev/google_fonts-2.3.3/lib/src/google_fonts_base.dart:32:31: Error: 'AssetManifest' is imported from both 'package:flutter/src/services/asset_manifest.dart' and 'package:google_fonts/src/asset_manifest.dart'.
AssetManifest assetManifest = AssetManifest();
^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

Where:
Script 'C:srcflutterpackagesflutter_toolsgradleflutter.gradle' line: 1154

What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command 'C:srcflutterbinflutter.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 18s
Running Gradle task 'assembleRelease'... 18,8s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1`

Flutter pub upgrade

C:srcflutterbinflutter.bat --no-color pub upgrade Resolving dependencies... Git error. Command: git rev-list --max-count=1 HEAD`
stdout:
stderr: usage: git rev-list [] ... [--] [...]

limiting output:
--max-count=
--max-age=
--min-age=
--sparse
--no-merges
--min-parents=
--no-min-parents
--max-parents=
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--exclude-hidden=[receive|uploadpack]
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--disk-usage[=human]
--unpacked
--header | --pretty
--[no-]object-names
--abbrev= | --no-abbrev
--abbrev-commit
--left-right
--count
special purpose:
--bisect
--bisect-vars
--bisect-all
exit code: 129
Process finished with exit code 69`

Flutter pub get

C:srcflutterbinflutter.bat --no-color pub get Resolving dependencies... build_runner 2.3.3 (2.4.0 available) cross_file 0.3.3+2 (0.3.3+4 available) flutter_adaptive_scaffold 0.0.9 (0.1.0 available) flutter_facebook_auth 4.4.1+1 (5.0.7 available) flutter_facebook_auth_platform_interface 3.2.0 (4.1.1 available) flutter_facebook_auth_web 3.2.0 (4.1.1 available) flutter_html 3.0.0-alpha.5 (3.0.0-alpha.6 available) flutter_html_audio 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_svg 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_table 3.0.0-alpha.3 (3.0.0-alpha.4 available) flutter_html_video 3.0.0-alpha.4 (3.0.0-alpha.5 available) flutter_launcher_icons 0.9.3 (0.11.0 available) flutter_layout_grid 1.0.6 (2.0.1 available) flutter_local_notifications 8.2.0 (13.0.0 available) flutter_local_notifications_platform_interface 4.0.1 (6.0.0 available) flutter_slidable 1.3.2 (2.0.0 available) flutter_svg 1.1.6 (2.0.0+1 available) google_fonts 2.3.3 (4.0.3 available) google_geocoding 0.2.0 (discontinued) google_maps_flutter_web 0.3.3 (0.4.0+5 available) image 3.3.0 (4.0.13 available) intl 0.17.0 (0.18.0 available) json_serializable 6.6.0 (6.6.1 available) mobx 2.1.3 (2.1.3+1 available) numerus 1.1.1 (2.0.0 available) share 2.0.4 (discontinued) shared_preferences_foundation 2.1.2 (2.1.3 available) source_gen 1.2.6 (1.2.7 available) table_calendar 3.0.8 (3.0.9 available) timezone 0.8.0 (0.9.1 available) webview_flutter 3.0.4 (4.0.2 available) webview_flutter_android 2.10.4 (3.2.4 available) webview_flutter_platform_interface 1.9.5 (2.0.1 available) webview_flutter_wkwebview 2.9.5 (3.0.5 available) win32 3.1.3 (4.1.1 available) Got dependencies! Process finished with exit code 0

Flutter doctor

`Windows PowerShell
Copyright (C) Microsoft Corporation. Todos los derechos reservados.

PS C:WindowsSystem32WindowsPowerShellv1.0> flutter doctor -v
[√] Flutter (Channel master, 3.8.0-3.0.pre.22, on Microsoft Windows [Versi¢n 10.0.17763.107], locale es-CU)
• Flutter version 3.8.0-3.0.pre.22 on channel master at C:srcflutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 69421c1 (34 hours ago), 2023-02-02 23:28:57 -0800
• Engine revision e3fe6dade9
• Dart version 3.0.0 (build 3.0.0-198.0.dev)
• DevTools version 2.21.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:srcSdk
• Platform android-33-ext4, build-tools 33.0.0
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:Program FilesGoogleChromeApplicationchrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.4.4)
• Visual Studio at C:Program Files (x86)Microsoft Visual Studio2022BuildTools
• Visual Studio Build Tools 2022 version 17.4.33213.308
• Windows 10 SDK version 10.0.20348.0

[√] Android Studio (version 2021.3)
• Android Studio at C:Program FilesAndroidAndroid 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.13+0-b1751.21-8125866)

[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Versi¢n 10.0.17763.107]
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.120
! Device 9888d9463636504450 is offline.

[√] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!
PS C:WindowsSystem32WindowsPowerShellv1.0>`

I tried flutter clean, pub get, I tried in another project and everything is fine, the error is in this one only

2

Answers


  1. upgrade version of google font in dependencies

    Login or Signup to reply.
  2. I was facing the same issue, I just update the google_font library in pubspec.yaml file.
    You can fetch latest version from this link

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search