android - 运行我的 Flutter 项目时,我的 Flutter 项目中出现 AndroidX 不兼容问题
问题描述
即使我已经将我的颤振项目迁移到 AndroidX,我的颤振项目中也出现了 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
解决方案
What is your gradle version in App/build.gradle? this erro possibly has been caused beacause your gradle version is 3.2.1, some packages need gladle 3.3.x or above to work properly
推荐阅读
- angular - 类型“订阅”缺少以下属性
- python - AttributeError:“str”对象没有属性“shape”错误
- python - “超出纳秒时间戳”?你如何避免这个错误?
- data-structures - 如何找到所有子数组中所有可能的反转计数的总和?
- c++ - 我需要一些帮助来理解一些涉及 C++ 中的链表的代码
- motion - 如何使用两个摄像头提高物体姿态估计solvePnP的精度?
- java - Android Studio使用片段打开导航抽屉并处理后退按钮按下
- c++ - swap(int&, int&) 函数在不使用临时变量的情况下交换时不起作用?
- c++ - GCC(libstdc++)运行时如何决定在异常处于活动状态时终止()
- swift - Core Data 的 SwiftUI 示例数据