android - Flutter 闪屏 - 构建失败可能是由于插件中的 AndroidX 不兼容
问题描述
整个错误是这样的:
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin flutter_plugin_android_lifecycle...
FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleAarRelease' not found in root project 'flutter_plugin_android_lifecycle'.
* Try:
Run gradlew tasks to get a list of available tasks. 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 1s
Exception: The plugin flutter_plugin_android_lifecycle could not be built due to the issue above
至少我尝试将颜色从白色更改为蓝色;
<item android:drawable="@android:color/blue" />
还尝试创建一个 colors.xml 文件并将上面的行更改为:
<item android:drawable="@color/background" />
但同样的错误。我的 sdk 编译版本是 30,目标版本也是 30,minsdk 版本是 16,但在出现此错误后尝试将其更改为 19,但没有帮助。
解决方案
确保flutter是flutter_plugin_android_lifecycle包的升级或更低版本
推荐阅读
- cumulocity - 您如何反转从 REST API 响应中给出的数据?
- java - TFS SDK 11.0.0 - TFS 2015 Update 3 服务器 - NullPointerException 创建缺陷
- android - 将 RxJava 主题转换为可观察对象
- java - 链接生成的 Jooq 类时如何解决不明确的匹配
- googletest - 一种测试函数不调用退出但正常返回的方法,使用 gtest
- vue.js - Axios + Vue 两次执行相同的 POST
- php - REST (PHP, CURL) PUT/POST XML 问题:400 错误请求,使用 Walmart OAuth API 的“无效 URL”响应(要测试的邮递员)
- bash - 在 bash 循环中迭代数字的不寻常增量步进模式
- java - 如何获取一个长字符串,并创建以特定字符序列开头 & 结尾的较小字符串
- arrays - 带有余数的 Numpy 重塑会引发错误