Pub无法检索任何Dart包

时间:2018-03-26 03:11:38

标签: dart flutter

无论我尝试获取哪个dart个包,pub都无法检索它。 在我的项目根文件夹中,我运行: flutter packages get

我一直得到:

Got socket error trying to find package cupertino_icons at https://pub.dartlang.org. pub get failed (69) -- attempting retry 1 in 1 second...

以下是flutter doctor的输出:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (on Mac OS X 10.13.3 17D47, locale en-US, channel beta)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.0)
[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
[!] VS Code (version 1.21.1)
[!] Connected devices
! No devices available
! Doctor found issues in 2 categories.

pubspec是IntelliJ Flutter的向导所带来的:

name: my_friendchat
description: A new Flutter project.

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.1"

知道如何修理酒吧吗?

1 个答案:

答案 0 :(得分:0)

所以...重新启动我的笔记本电脑只是修复它。