运行flutter pub get 时报错 because every version of flutter_test from sdk depends on path 1.8.1 and flutter_tesseract_ocr depends on path ^1.8.2, flutter_test from sdk is forbidden.
时间: 2024-04-15 16:24:20 浏览: 176
I apologize for any confusion caused. To resolve the conflict between the dependencies of `flutter_test` and `flutter_tesseract_ocr`, you can try the following steps:
1. Open your project's `pubspec.yaml` file.
2. Locate the dependencies section.
3. Find the entry for `flutter_test` and check its version. It should be specified under the `dev_dependencies` section.
4. Modify the version constraint of `flutter_test` to allow a higher version of the `path` package. For example, you can change it to `path: '>=1.8.2'`.
5. Save the changes to the `pubspec.yaml` file.
6. Run `flutter pub get` to fetch the updated dependencies.
By allowing a higher version of the `path` package in the `flutter_test` dependency, you should be able to resolve the conflict with `flutter_tesseract_ocr`.
If you still encounter any issues, make sure to double-check your `pubspec.yaml` file for any conflicting dependencies or syntax errors. If the problem persists, you may need to consider reaching out to the package maintainers for further assistance.
阅读全文