我正在嘗試在我的pubspec.yaml檔案中添加顫動藍色,但版本解決失敗但它似乎不支持在同一個 pubspec.yaml 檔案中存在顫動反應 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 版本,如前所述,我會收到很多其他錯誤。除顫動的藍色外,所有依賴項都與此專案匹配。
該專案完全可以正常作業,無需添加顫動藍色。
如果我升級軟體包,我仍然無法將顫動的藍色與我正在使用的其他依賴項匹配。
我撓了撓頭,不知道應該使用哪個顫動的藍色版本。
請幫助我的人。
uj5u.com熱心網友回復:
我設定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

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/439626.html
下一篇:如何在Flutter中格式化時間
