Flatter Pubspec.yaml警告:可发布的包可以';我没有git依赖项

Flatter Pubspec.yaml警告:可发布的包可以';我没有git依赖项,git,flutter,Git,Flutter,我在我的pubspec.yaml中使用Sembast Cloud Firestore类型适配器: sembast_cloud_firestore_type_adapters: git: url: git://github.com/tekartik/sembast_flutter_more.dart path: cloud_firestore_type_adapters ref: dart2 version: '>=0.1.0'

我在我的pubspec.yaml中使用Sembast Cloud Firestore类型适配器:

  sembast_cloud_firestore_type_adapters:
    git:
      url: git://github.com/tekartik/sembast_flutter_more.dart
      path: cloud_firestore_type_adapters
      ref: dart2
      version: '>=0.1.0'
和加载适配器:

  loading:
    git:
      url: git://github.com/leonzone/loading.git
      path: loading
      ref: 8f5a63f
直到今天一切都很好。我在上面两行中都得到了这个错误:
警告:可发布的包不能具有git依赖项。

这是我的
颤振医生

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.24.0-7.0.pre.71, on Mac OS X 10.15.7 19H2 darwin-x64,
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.50.1)
[✓] Connected device (3 available)

• No issues found!

在git帐户中添加SSH将解决您的问题。访问了解如何生成SSH密钥

我的猜测是,通过对设置为发布的包进行额外检查,它可以帮助您防止发布虚拟/旧包。您应该添加(在文档的根目录下,例如
version
字段之后):


对于您的
pubspec.yaml

,这并没有为我解决特定的错误,pubspec仍然会出错。它所做的就是解决实际应用程序中的所有错误,而我真的不知道如何解决!你能分享你的yaml文件吗?多亏了你的帮助,这个应用现在可以运行了。如果你真的愿意,我可以和你分享!工作正常,但这需要添加到根yaml,而不是单个依赖项。
publish_to: none