颤振HTTP插件

颤振HTTP插件,http,flutter,plugins,Http,Flutter,Plugins,当我尝试将SQL数据库云与Flatter组合时,出现了此错误。问题可能是什么?我已经安装了HTTP插件 Running "flutter pub get" in fl_3441... Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source. ╷ 21 │ ┌ sdk: flutter 22 │ │ http: ^0.12.0 23 │ │ 24 │ │ # The following

当我尝试将SQL数据库云与Flatter组合时,出现了此错误。问题可能是什么?我已经安装了HTTP插件

Running "flutter pub get" in fl_3441...

Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source.
 ╷
21 │ ┌ sdk: flutter
22 │ │ http: ^0.12.0
23 │ │
24 │ │ # The following adds the Cupertino Icons font to your application.
25 │ │ # Use with the CupertinoIcons class for iOS style icons.
26 │ │ cupertino_icons: ^0.1.2
 │ └──^
 ╵
---- Log transcript ----

FINE: Pub 2.8.1
MSG : Resolving dependencies...
SLVR: fact: hello_world is 1.0.0+1
SLVR: derived: hello_world
SLVR: Version solving took 0:00:00.055054 seconds.
 | Tried 1 solutions.
FINE: Resolving dependencies finished (0.1s).
ERR : Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source.
 | ╷
 | 21 │ ┌ sdk: flutter
 | 22 │ │ http: ^0.12.0
 | 23 │ │
 | 24 │ │ # The following adds the Cupertino Icons font to your application.
 | 25 │ │ # Use with the CupertinoIcons class for iOS style icons.
 | 26 │ │ cupertino_icons: ^0.1.2
 | │ └──^
 | ╵
FINE: Exception type: PubspecException
FINE: package:pub/src/pubspec.dart 787:5 Pubspec._error
 | package:pub/src/pubspec.dart 636:11 Pubspec._parseDependencies.<fn>
 | dart:collection MapView.forEach
 | package:pub/src/pubspec.dart 600:15 Pubspec._parseDependencies
 | package:pub/src/pubspec.dart 164:9 Pubspec.dependencies
 | package:pub/src/solver/package_lister.dart 211:35 PackageLister.incompatibilitiesFor
 | ===== asynchronous gap ===========================
 | dart:async Future.catchError
 | package:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
 | package:stack_trace Chain.capture
 | package:pub/src/utils.dart 126:11 captureErrors
 | package:pub/src/command_runner.dart 191:13 PubCommandRunner.runCommand

---- End log transcript ----
pub get failed (65; ---- End log transcript ----)
在fl_3441中运行“Flatter pub get”。。。
pubspec.yaml第5列第21行出错:依赖项只能有一个源。
╷
21│ ┌ sdk:颤振
22│ │ http:^0.12.0
23│ │
24│ │ # 下面将Cupertino图标字体添加到应用程序中。
25│ │ # 与CupertinoIcons类一起用于iOS风格的图标。
26│ │ cupertino_图标:^0.1.2
│ └──^
╵
----日志记录----
罚款:第2.8.1条
正在解析依赖项。。。
SLVR:事实:你好,世界是1.0.0+1
SLVR:Derivated:hello_world
SLVR:版本解决耗时0:00:00.055054秒。
|尝试了1种解决方案。
精细:已完成解析依赖项(0.1s)。
ERR:publispec.yaml第5列第21行出错:依赖项只能有一个源。
| ╷
| 21 │ ┌ sdk:颤振
| 22 │ │ http:^0.12.0
| 23 │ │
| 24 │ │ # 下面将Cupertino图标字体添加到应用程序中。
| 25 │ │ # 与CupertinoIcons类一起用于iOS风格的图标。
| 26 │ │ cupertino_图标:^0.1.2
| │ └──^
| ╵
精细:异常类型:PubspecException
精细:包:pub/src/pubspec.dart 787:5 pubspec.\u错误
|包:pub/src/pubspec.dart 636:11 pubspec.\u。
|dart:集合MapView.forEach
|包:pub/src/pubspec.dart 600:15 pubspec.\u
|包:pub/src/pubspec.dart 164:9 pubspec.dependencies
|包:pub/src/solver/package_lister.dart 211:35 PackageLister.compatibilities for
|======异步间隙===========================
|dart:async Future.catchError
|包:pub/src/utils.dart 113:52 captureErrors.wrappedCallback
|包:stack_trace Chain.capture
|包:pub/src/utils.dart 126:11 captureErrors
|包:pub/src/command_runner.dart 191:13 PubCommandRunner.runCommand
----结束日志记录----
发布获取失败(65;----结束日志记录---)

您没有正确添加包。在pubspec.yaml文件中,间距非常重要

看看下面,新增加的包装必须符合f的颤振

dependencies:
  flutter:
    sdk: flutter
  carousel_pro: ^0.0.13
  http: ^0.12.0