将 Flutter 和 Dart 升级到最新版本后,我还更新了我的应用程序的依赖项。现在,当我运行时,出现flutter pub get
以下错误:
Because no versions of permission_handler match >5.1.0+2 <6.0.0 and permission_handler 5.1.0+2 depends on permission_handler_platform_interface ^2.0.2, permission_handler ^5.1.0+2 requires permission_handler_platform_interface ^2.0.2.
And because no versions of permission_handler_platform_interface match >2.0.2 <3.0.0 and permission_handler_platform_interface 2.0.2 depends on plugin_platform_interface ^1.0.2, permission_handler ^5.1.0+2 requires plugin_platform_interface ^1.0.2.
And because geolocator >=7.0.0 depends on geolocator_platform_interface ^2.0.0 which depends on plugin_platform_interface ^2.0.0, permission_handler ^5.1.0+2 is incompatible with geolocator >=7.0.0.
So, because MyApp depends on both geolocator ^7.0.1 and permission_handler ^5.1.0+2, version solving failed.
Running "flutter pub get" in flutter_app...
pub get failed (1; So, because MyApp depends on both geolocator ^7.0.1 and permission_handler ^5.1.0+2, version solving failed.)
我不太明白错误在哪里以及我能做些什么来解决它。如果有任何信息缺失,我会尽快补充。有谁知道我需要在依赖项中更改什么?
这是我的flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.19042.804], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (3 available)
• No issues found!