Flutter软件包获取未安装新软件包 [英] Flutter packages get does not install new package
问题描述
我正在尝试在flutter中安装软件包(dynamic_theme).当我运行flutter packages get -v
时,它甚至都没有尝试安装该软件包.
I'm trying to install a package (dynamic_theme) in flutter. When I run flutter packages get -v
it does not even try to install the package.
到目前为止,我已经尝试过:
So far I've tried:
- 运行
flutter packages get
- 运行
flutter packages get
- 重新启动计算机
- 更新的抖动
- 添加了另一个软件包,但没有安装
- 更新的Android Studio
- Running
flutter packages get
- Running
flutter packages get
- Restarting my computer
- Updated flutter
- Added another package but that did not install either
- Updated Android Studio
在我的pubspec.yaml中,输入:
In my pubspec.yaml I've put:
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
的详细运行日志中,它将安装输出的软件包:
In the logs for the verbose run of flutter packages get
where it installs the packages it outputs:
[ +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.
我希望flutter下载并安装了这些软件包,但它只是检查是否已安装的软件包(例如firebase_core
)上的更新.
I expected that flutter downloaded and installed the packages, but it does just check for updates on the already installed packages like firebase_core
.
推荐答案
有些事情是随机解决的.我什么也没做,只是尝试了多次.尝试10次后,它下载并安装了uuid和dynamic_theme.
Something solved it randomly. I did not do anything but try multiple times. After some 10 attempts it downloaded and installed both uuid and dynamic_theme.
这篇关于Flutter软件包获取未安装新软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!