找不到androidx。旧版:legacy-support-v4:27.0.2

找不到androidx。旧版:legacy-support-v4:27.0.2,android,flutter,geolocation,flutter-dependencies,Android,Flutter,Geolocation,Flutter Dependencies,我添加了地理定位器依赖项,然后出现了一个android x不兼容的错误。有人能帮我摆脱这一切吗 Launching lib\main.dart on Android SDK built for x86 in debug mode... FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:preDebugBuild'. >

我添加了地理定位器依赖项,然后出现了一个android x不兼容的错误。有人能帮我摆脱这一切吗

Launching lib\main.dart on Android SDK built for x86 in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find androidx.legacy:legacy-support-v4:27.0.2.
     Searched in the following locations:
       - file:/C:/Users/Rutvik/AppData/Local/Android/sdk/extras/m2repository/androidx/legacy/legacy-support-v4/27.0.2/legacy-support-v4-27.0.2.pom
     Required by:
         project :app > project :image_picker

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 7s
****************************************************

将所有依赖项迁移到andriodx包将解决此问题

在这里,您的地理定位器最新版本使用androidx软件包,其中图像选择器依赖项使用android软件包。您需要将图像选择器库更新为最新版本

快速修复:将地理定位器降级为2.1.1以解决此问题。这不是最好的办法


将所有依赖项升级到androidx Compatible是您可以尝试的最佳方法

将所有依赖项迁移到andriodx包将解决此问题

在这里,您的地理定位器最新版本使用androidx软件包,其中图像选择器依赖项使用android软件包。您需要将图像选择器库更新为最新版本

快速修复:将地理定位器降级为2.1.1以解决此问题。这不是最好的办法


将所有依赖项升级到androidx Compatible是您可以尝试的最佳方法

您是否尝试升级到androidx?是否尝试升级到androidx?