Sam*_*uel 4 dart flutter flutter-dependencies
我有这个项目,当我没有添加chatview: ^1.2.0+1时工作正常。现在将其添加为依赖项后,出现以下错误
\nBecause chatview >=1.0.0 depends on intl ^0.18.0 and mobile_app depends on intl ^0.17.0, chatview >=1.0.0 is forbidden.\nSo, because mobile_app depends on chatview ^1.2.0+1, version solving failed.\npub get failed\ncommand: "/Users/samuel/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"\npub env: {\n "FLUTTER_ROOT": "/Users/samuel/flutter",\n "PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",\n "PUB_CACHE": "/Users/samuel/.pub-cache",\n}\nexit code: 1\n
Run Code Online (Sandbox Code Playgroud)\n现在我更改了我期望工作正常的intl
软件包版本,但我还收到了另一个错误intl ^0.18.0
Because mobile_app depends on flutter_localizations from sdk which depends on intl 0.17.0, intl 0.17.0 is required.\nSo, because mobile_app depends on intl ^0.18.0, version solving failed.\npub get failed\ncommand: "/Users/samuel/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"\npub env: {\n "FLUTTER_ROOT": "/Users/samuel/flutter",\n "PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",\n "PUB_CACHE": "/Users/samuel/.pub-cache",\n}\nexit code: 1\n
Run Code Online (Sandbox Code Playgroud)\n现在我又不知道该怎么办了。下面是我的 pubspec.yaml 文件
\nenvironment:\n sdk: ">=2.18.4 <3.0.0"\n\ndependencies:\n flutter:\n sdk: flutter\n\n # The following adds the Cupertino Icons font to your application.\n # Use with the CupertinoIcons class for iOS style icons.\n cupertino_icons: ^1.0.2\n get: ^4.6.5\n flutter_svg_provider: ^1.0.3\n shared_preferences: ^2.0.10\n http: ^0.13.5\n image_picker: ^0.8.5+3\n flutter_localizations:\n sdk: flutter\n intl: ^0.18.0\n logger: ^1.1.0\n pretty_http_logger: ^0.2.1\n font_awesome_flutter: ^9.2.0\n package_info_plus: ^3.0.0\n flutter_screenutil: ^5.5.4\n another_flushbar: ^1.12.29\n flutter_fadein:\n avatar_glow: ^2.0.2\n dropdown_search: ^5.0.5\n expandable_text: ^2.3.0\n infinite_scroll_pagination: ^3.2.0\n cached_network_image: ^3.2.3\n chatview: ^1.2.0+1\n
Run Code Online (Sandbox Code Playgroud)\n[\xe2\x9c\x93] Flutter (Channel stable, 3.7.1, on macOS 13.0.1 22A400 darwin-x64, locale en-GH)\nChecking Android licenses is taking an unexpectedly long time...[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 33.0.1)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 14.1)\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 2021.3)\n[\xe2\x9c\x93] VS Code (version 1.75.1)\n[\xe2\x9c\x93] Connected device (2 available)\n[\xe2\x9c\x93] HTTP Host Availability\n
Run Code Online (Sandbox Code Playgroud)\n
Sam*_*uel 15
所以最近有更新,将flutter sdk本地化的依赖版本拓宽为 >=0.17.0 <0.19.0
所以我只是通过以下方式覆盖了我的依赖以使用 0.18.0:
dependency_overrides:
intl: ^0.18.0
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
9708 次 |
最近记录: |