我无法安装程序包缓存的网络映像

时间:2019-08-23 17:07:24

标签: android-studio flutter dart

我正在尝试使用flutter创建一个新应用程序,并且我想使用程序包缓存的网络映像,但是该程序包不想安装在我的pubspec.yaml中

我尝试了flutter升级,并且flutter医生没有显示错误

dependencies:
  flutter:
    sdk: flutter

  firebase_auth: ^0.14.0+2
  firebase_core: ^0.4.0+8
  cloud_firestore: ^0.12.9
  firebase_storage: ^3.0.5
  font_awesome_flutter: ^8.5.0
  fluttertoast: ^3.1.0
  image_picker: ^0.6.1+3
  cached_network_image: ^1.1.1
C:\fltr\flutter\bin\flutter.bat --no-color packages get
Running "flutter pub get" in socialflutter_app...               
Error on line 1, column 1 of ..\..\..\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cached_network_image-1.1.1\pubspec.yaml: Unexpected character.
  ╷




1 │                                                                                                                                                                                                                                                                                                                                                                                                                                      
  │ ^
  ╵
pub get failed (65)
Process finished with exit code 65

1 个答案:

答案 0 :(得分:1)

尝试导航至Flutter文件夹,然后导航至pub-cache\hosted\pub.dartlang.org\并删除所有cached_network_image文件夹。

enter image description here

然后在您的项目中再次运行flutter packages get