Flutter包get不会安装新包

问题描述 投票:0回答:2

我正在尝试在flutter中安装一个包(dynamic_theme)。当我运行flutter packages get -v时,它甚至没有尝试安装包。

到目前为止,我已经尝试过:

  • 运行flutter packages get
  • 运行flutter packages get
  • 重新启动我的电脑
  • 更新了扑动
  • 添加了另一个包,但没有安装
  • 更新了Android Studio

在我的pubspec.yaml中我放了:

dependencies:
  flutter:
    sdk: flutter
  firebase_core:
  cupertino_icons: ^0.1.2
  dynamic_theme: ^1.0.1 # the package does not install
  uuid: 2.0.0 # the package does not install

flutter packages get详细运行的日志中,它安装了它输出的包:

[ +422 ms] Running "flutter packages get" in quiz_app... (completed in 0.4s)
[  +57 ms] Found plugin firebase_core at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.3.4\
[  +13 ms] Found plugin shared_preferences at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\shared_preferences-0.5.2\
[ +141 ms] Found plugin firebase_core at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.3.4\
[   +6 ms] Found plugin shared_preferences at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\shared_preferences-0.5.2\
[  +26 ms] "flutter get" took 718ms.

我期望下载并安装软件包,但它只检查已安装的软件包(如firebase_core)的更新。

flutter flutter-dependencies
2个回答
0
投票

尝试将^添加到uuid:2.0.0 祝好运

  // The last version is 
uuid: ^2.0.1 

0
投票

有些东西随机解决了。我没有做任何事,只是多次尝试。经过大约10次尝试后,它下载并安装了id和动态主题。

© www.soinside.com 2019 - 2024. All rights reserved.