升级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!
这是因为这个包还不支持null安全。我认为你应该在他们的GitHub仓库上创建一个问题,而不是在这里问问题。