记一次Flutter 启动出现 Invalid plugin specification. Invalid "macos" plugin specificationc 错误

  最近在看 Flutter 的知识,于是去网上找了几个项目开源的项目在本地跑跑。结果在跑 https://github.com/Sky24n/flutter_wanandroid.git  这个好项目的时候,就出现了启动的错误。


错误的内容 

Invalid plugin specification.

Invalid "macos" plugin specification.

 

处理地址 : 

https://github.com/flutter/flutter/issues/52322

https://www.gitmemory.com/issue/flutter/flutter/52322/597155433

 

目测应该是版本什么不正确导致的问题。切换下版本就可以了。


 

如果你还看到了这个错误

Compiler message:
../../../.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
  ImageStreamCompleter load(CachedNetworkImageProvider key) {
                       ^
../../software/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
  ImageStreamCompleter load(T key, DecoderCallback decode);
                       ^
Exception: Errors during snapshot creation: null

将cached_network_image的版本号升级到2.0.0-rc

 

博客地址:https://blog.csdn.net/yinxing2008/article/details/103374996

到这里,这个项目就可以启动起来了啦。


 

顺便记录一下 Flutter 进行版本的切换操作

flutter channel 

  flutter channel dev(beta/master等)

  flutter version

  flutter version v1.9.1+hotfix.3  (切换版本的指令)

 

 

 

 

 

 

你可能感兴趣的:(记一次Flutter 启动出现 Invalid plugin specification. Invalid "macos" plugin specificationc 错误)