我正在尝试在我的 pubspec.yaml 文件中添加 flutter blue,但版本解析失败
I am trying to add flutter blue in my pubspec.yaml file, but version solving is failed
我正在尝试在我的 pubspec.yaml
文件中添加 flutter blue,但是版本解析失败但它似乎不支持在同一个 pubspec.yaml 文件中存在 flutter reactive ble。
以下是我的pubspec.yaml文件:
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
image_picker:
http: ^0.12.0+4
flutter_bloc: ^4.0.0
equatable: ^1.0.0
shared_preferences: ^0.5.7
fluttertoast: ^8.0.8
flutter_spinkit: "^4.1.2"
intl: ^0.16.1
auto_orientation: 2.1.0
exif: ^1.0.2
image: ^2.1.4
flutter_exif_rotation: 0.3.0
animated_floatactionbuttons: ^0.1.0
ffi: ^1.0.0
provider: ^4.0.5
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
get: ^4.6.1
flutter_reactive_ble: ^3.1.1+1
js: ^0.6.3
flutter_launcher_icons: ^0.8.1
dev_dependencies:
flutter_test:
sdk: flutter
在终端,当我运行,
flutter pub add flutter_blue
我收到以下错误:
Because flutter_blue <0.4.0 requires SDK version >=1.8.0 <2.0.0 and flutter_blue >=0.4.0 <0
.4.2 depends on protobuf ^0.9.1, flutter_blue <0.4.2 requires protobuf ^0.9.1.
And because flutter_blue >=0.4.2 <0.6.0 depends on protobuf ^0.10.5, flutter_blue <0.6.0 re
quires protobuf ^0.9.1 or ^0.10.5.
And because flutter_blue >=0.6.0 <0.6.1 depends on protobuf ^0.13.12 and flutter_blue >=0.6
.1 <0.6.3+1 depends on protobuf ^0.14.1, flutter_blue <0.6.3+1 requires protobuf ^0.9.1 or
^0.10.5 or ^0.13.12 or ^0.14.1.
And because flutter_blue >=0.6.3+1 <0.7.2 depends on protobuf ^1.0.0 and flutter_blue ^0.7.
2 depends on protobuf ^1.0.1, flutter_blue <0.8.0 requires protobuf ^0.9.1 or ^0.10.5 or ^0
.13.12 or ^0.14.1 or >=1.0.0 <2.0.0.
And because flutter_reactive_ble ^3.0.0 depends on protobuf ^2.0.0 and flutter_blue >=0.8.0
depends on convert ^3.0.0, if flutter_reactive_ble ^3.0.0 and flutter_blue any then conver
t ^3.0.0.
And because attendanceapp depends on exif ^1.0.2 which depends on convert ^2.0.0, flutter_r
eactive_ble ^3.0.0 is incompatible with flutter_blue.
So, because attendanceapp depends on both flutter_reactive_ble ^3.1.1+1 and flutter_blue an
y, version solving failed.
pub finished with exit code 65
现在,如果更改为 A SDK 版本,如前所述,我会收到很多其他错误。除 flutter blue 外,所有依赖都匹配此项目。
该项目在不添加 flutter blue 的情况下完全可以正常工作。
如果我升级包,我仍然无法将 flutter blue 与我正在使用的其他依赖项相匹配。
摸不着头脑,不知道应该用哪个flutter blue版本。
请有人帮助我。
我将 flutter_blue
设置为 0.7.0
,将 flutter_reactive_ble
设置为 2.7.3
。我不确定这么旧的版本是否包含您需要的所有功能。但是 pug get
显示这组版本没有错误
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
image_picker:
http: ^0.12.0+4
flutter_bloc: ^4.0.0
equatable: ^1.0.0
shared_preferences: ^0.5.7
fluttertoast: ^8.0.8
flutter_spinkit: "^4.1.2"
intl: ^0.16.1
auto_orientation: 2.1.0
exif: ^1.0.2
image: ^2.1.4
flutter_exif_rotation: 0.3.0
animated_floatactionbuttons: ^0.1.0
ffi: ^1.0.0
provider: ^4.0.5
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
get: ^4.6.1
flutter_reactive_ble: 2.7.3
js: ^0.6.3
flutter_launcher_icons: ^0.8.1
flutter_blue: 0.7.0
我正在尝试在我的 pubspec.yaml
文件中添加 flutter blue,但是版本解析失败但它似乎不支持在同一个 pubspec.yaml 文件中存在 flutter reactive ble。
以下是我的pubspec.yaml文件:
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
image_picker:
http: ^0.12.0+4
flutter_bloc: ^4.0.0
equatable: ^1.0.0
shared_preferences: ^0.5.7
fluttertoast: ^8.0.8
flutter_spinkit: "^4.1.2"
intl: ^0.16.1
auto_orientation: 2.1.0
exif: ^1.0.2
image: ^2.1.4
flutter_exif_rotation: 0.3.0
animated_floatactionbuttons: ^0.1.0
ffi: ^1.0.0
provider: ^4.0.5
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
get: ^4.6.1
flutter_reactive_ble: ^3.1.1+1
js: ^0.6.3
flutter_launcher_icons: ^0.8.1
dev_dependencies:
flutter_test:
sdk: flutter
在终端,当我运行,
flutter pub add flutter_blue
我收到以下错误:
Because flutter_blue <0.4.0 requires SDK version >=1.8.0 <2.0.0 and flutter_blue >=0.4.0 <0
.4.2 depends on protobuf ^0.9.1, flutter_blue <0.4.2 requires protobuf ^0.9.1.
And because flutter_blue >=0.4.2 <0.6.0 depends on protobuf ^0.10.5, flutter_blue <0.6.0 re
quires protobuf ^0.9.1 or ^0.10.5.
And because flutter_blue >=0.6.0 <0.6.1 depends on protobuf ^0.13.12 and flutter_blue >=0.6
.1 <0.6.3+1 depends on protobuf ^0.14.1, flutter_blue <0.6.3+1 requires protobuf ^0.9.1 or
^0.10.5 or ^0.13.12 or ^0.14.1.
And because flutter_blue >=0.6.3+1 <0.7.2 depends on protobuf ^1.0.0 and flutter_blue ^0.7.
2 depends on protobuf ^1.0.1, flutter_blue <0.8.0 requires protobuf ^0.9.1 or ^0.10.5 or ^0
.13.12 or ^0.14.1 or >=1.0.0 <2.0.0.
And because flutter_reactive_ble ^3.0.0 depends on protobuf ^2.0.0 and flutter_blue >=0.8.0
depends on convert ^3.0.0, if flutter_reactive_ble ^3.0.0 and flutter_blue any then conver
t ^3.0.0.
And because attendanceapp depends on exif ^1.0.2 which depends on convert ^2.0.0, flutter_r
eactive_ble ^3.0.0 is incompatible with flutter_blue.
So, because attendanceapp depends on both flutter_reactive_ble ^3.1.1+1 and flutter_blue an
y, version solving failed.
pub finished with exit code 65
现在,如果更改为 A SDK 版本,如前所述,我会收到很多其他错误。除 flutter blue 外,所有依赖都匹配此项目。
该项目在不添加 flutter blue 的情况下完全可以正常工作。
如果我升级包,我仍然无法将 flutter blue 与我正在使用的其他依赖项相匹配。
摸不着头脑,不知道应该用哪个flutter blue版本。
请有人帮助我。
我将 flutter_blue
设置为 0.7.0
,将 flutter_reactive_ble
设置为 2.7.3
。我不确定这么旧的版本是否包含您需要的所有功能。但是 pug get
显示这组版本没有错误
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
image_picker:
http: ^0.12.0+4
flutter_bloc: ^4.0.0
equatable: ^1.0.0
shared_preferences: ^0.5.7
fluttertoast: ^8.0.8
flutter_spinkit: "^4.1.2"
intl: ^0.16.1
auto_orientation: 2.1.0
exif: ^1.0.2
image: ^2.1.4
flutter_exif_rotation: 0.3.0
animated_floatactionbuttons: ^0.1.0
ffi: ^1.0.0
provider: ^4.0.5
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
get: ^4.6.1
flutter_reactive_ble: 2.7.3
js: ^0.6.3
flutter_launcher_icons: ^0.8.1
flutter_blue: 0.7.0