我遇到了问题。我在一个 flutter 项目中工作了好几个月了,它运行没有任何问题。但自从几次以来,每次我运行“flutter run”时,我都会在控制台中遇到以下问题。
这是我控制台的内容:ICI
更奇怪的是,我没有对 pubspec.yaml 进行任何更改,它正在谈论一个
stacked-3.4.4
库。
这是 pubspec.yaml
name: enzo
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
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.2.0+27
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
qr_flutter: ^4.0.0
font_awesome_flutter: ^10.1.0
country_icons: ^2.0.2
smooth_page_indicator: ^1.0.0+2
shared_preferences: ^2.0.13
provider: ^6.0.3
flutter_svg: ^1.0.3
flutter_local_notifications: ^9.1.4
carousel_slider: ^4.1.1
dio: ^4.0.6
video_player: ^2.4.5
direct_link: ^0.1.9
flutter_spinkit: ^5.1.0
cupertino_icons: ^1.0.2
cached_network_image: ^3.2.3
json_annotation: ^4.9.0
google_maps_flutter: ^2.1.8
flutter_rating_bar: ^4.0.1
dropdown_button2: ^2.3.9
google_fonts: ^4.0.4
country_code_picker: ^3.0.0
visibility_detector: ^0.2.1
#loader_overlay: ^3.0.3
flutter_staggered_animations: ^1.0.0
webview_flutter: ^3.0.0
flutter_facebook_auth: ^3.5.7
google_sign_in: ^5.0.3
#firebase_auth: ^4.6.3
#firebase_core: ^2.14.0
#stacked_card_carousel: ^0.0.3-nullsafety.1
kkiapay_flutter_sdk: ^1.1.0
permission_handler: ^10.0.0
path_provider: ^2.0.11
image_picker: ^0.8.6
image_gallery_saver: ^1.7.1
responsive_sizer: ^3.1.1
share_plus: ^6.3.0
flutter_localizations:
sdk: flutter
intl: ^0.18.0
circle_flags: ^0.0.3
flutter_cached_pdfview: ^0.4.3
#loading_animation_widget: 1.2.0
#uiblock: 2.0.1
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.1.11
json_serializable: ^6.2.0
flutter_launcher_icons: ^0.9.2
flutter_app_name: ^0.1.0
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^1.0.0
flutter_icons:
android: true
ios: true
image_path: "assets/logos/logo1.png"
remove_alpha_ios: true
flutter_app_name:
name: "MyCanalOlympia"
# The following section is specific to Flutter.
flutter:
generate: true
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/
- assets/images/
- assets/docs/
- assets/docs/cgu.pdf
- assets/icons/
- assets/logos/
- assets/board/
- assets/board/svg/
# fonts:
# - family: Open Sans
# fonts:
# - asset: assets/fonts/opensansbold700.ttf
# weight: 700
# - asset: assets/fonts/opensansopensans400.ttf
# weight: 400
# - asset: assets/fonts/opensansopensansromanextrabold800.ttf
# weight: 800
# - asset: assets/fonts/opensansopensansromansemibold600.ttf
# weight: 600
# - asset: assets/fonts/opensanslight300.ttf
# weight: 300
# - asset: assets/fonts/opensanssemibold600.ttf
# weight: 600
# - family: Roboto
# fonts:
# - asset: assets/fonts/robotoregular400.ttf
# weight: 400
flutter_intl:
enabled: true
analyzer:
strong-mode: true
language:
enableSuperMixins: true
这里是
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [version 10.0.19045.5247], locale fr-FR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these
components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2024.1)
[√] VS Code (version 1.95.3)
[√] Connected device (4 available)
[√] Network resources
如有任何帮助,我们将不胜感激。我挣扎了很多天但一无所获。
每次运行该项目,无论我做什么,它仍然会失败。