即使我已将Flutter项目迁移到AndroidX,我的Flutter项目中也遇到了AndroidX不兼容的问题。并且仍然再次遇到相同的问题。 我已遵循flutter文档在AndroidX中进行迁移在这里,我分享了文档链接 https://flutter.dev/docs/development/androidx-migration
请帮帮我。我花了很多小时仍然没有任何解决方案。 提前致谢。
我得到的错误在下面
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.coordinatorlayout:coordinatorlayout' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath. You should manually set the same version via DependencyResolution
* 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://gradle.org/help/
BUILD FAILED in 44s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://flutter.dev/docs/development/androidx-migration for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1
答案 0 :(得分:0)
App / build.gradle中的gradle版本是什么?该错误可能是由于您的gradle版本为3.2.1引起的,某些软件包需要gladle 3.3.x或更高版本才能正常工作