在最近的更新之后,pug-get不工作了.有什么想法吗



今天(2020年8月22日(,在安卓工作室上收到提示后,我更新了flutter。在那之后,每当我去酒吧时,我都会收到以下错误:

"由于来自sdk的每个版本的flutter都依赖于vector_math 2.1.0-nulsafety.2,这与任何版本都不匹配,因此禁止来自sdk。因此,由于flutter_app3依赖于sdk中的flutter-any,因此版本求解失败。pub-get失败(1;因此,由于flutter_app3依赖于sdk中的flutter-any,版本求解失败。(;

参见下面的颤振医生-v结果:

C:UsersUserStudioProjectsflutter_app3>flutter doctor -v

[√]Flutter(Channel beta,1.21.0-9.1.pre,在Microsoft Windows上[版本10.0.17134.1667],语言环境cs CZ(•Flutter版本1.21.0-9.1.pre,C:\src\Flutter•框架修订be9bc8cb39(4天前(,2020-08-18 09:46:08-0700•发动机版本267070c17a•Dart版本2.10.0(内部版本2.10.0-7.2测试版(

[√]Android工具链-为Android设备开发(Android SDK版本29.0.2(•位于C:\Users\User\AppData\Local\Android\SDK的Android SDK•平台android-29,构建工具29.0.2•Java二进制文件:C:\Program Files\Android\Android Studio\jre\bin\Java•Java版本OpenJDK运行时环境(版本1.8.0_224-release-1644-b01(•接受所有Android许可证。

[√]安卓工作室(4.0版(•Android Studio,位于C:\Program Files\Android\Android Studio•Flutter插件版本48.1.2•Dart插件版本193.7361•Java版本OpenJDK运行时环境(版本1.8.0_224-release-1644-b01(

[√]VS代码(版本1.47.2(•位于C:\Users\User\AppData\Local\Programs\Microsoft VS Code的VS代码•Flutter扩展版本3.12.2

[√]连接设备(1个可用(•HD1903(移动(•aa3eee24•android-arm64•android 10(API 29(

•未发现任何问题!

pubspec.yaml:

name: flutter_app3
description: A new Flutter application.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
#   - images/a_dot_burr.jpeg
#   - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
#   - family: Schyler
#     fonts:
#       - asset: fonts/Schyler-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

提前谢谢。

您使用了通道贝塔扑动。我认为你需要使用稳定的频道。

最新更新