flutter - Flutter Build APK:失败 - 任务“:keyboard_visibility:verifyReleaseResources”执行失败
问题描述
更新颤振或 android studio 后,我面临一个奇怪的问题。我之前能够运行 flutter build apk 命令。但我可以为同一应用程序的 iOS 版本导出 ipa。
我已经更新了最新版本的软件包。检查“compilesdkversion 28”。我认为一切看起来都不错。
你可以在下面看到我失败的包。
- 键盘可见性
- 连通性
这是错误输出;
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/Users/serkanerkan/.gradle/caches/transforms-2/files-2.1/a528b13ac93e64cafa3d0480e2c93207/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/serkanerkan/.gradle/caches/transforms-2/files-2.1/a528b13ac93e64cafa3d0480e2c93207/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
* 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 16s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 17.8s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin connectivity...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done 1,391ms
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'connectivity'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* 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 1s
The plugin connectivity could not be built due to the issue above.
解决方案
转到这个文件夹-> C:\flutter.pub-cache\hosted\pub.dartlang.org\keyboard_visibility-0.5.6\android 打开 build.gradle 将 compileSdkVersion 27 更改为 compileSdkVersion 28 然后 flutter clean -> flutter pub get - > 颤振构建 apk --release
推荐阅读
- visual-studio - 为什么我会收到包含 pch.h 的警告,即使它已经包含在内?
- python - Fashion-MNIST 数据集维度的困难
- kubernetes - kubernetes cronjob 只运行一次?
- bash - Git pull 在终端中有效,但在 bash 文件中无效(来自 webhooks)
- css - 如何声明多个字体并将它们中的每一个分配给一个变量并在样式组件中访问它们
- c++ - mp4 的fourcc 代码 ('X','2','6','4'),('m','p','4','v'), ('M','P', '4','V'),('A','V','C','1'),('a','v','c','1'),('M', 'J','P','G')
- php - 如何格式化 JSON 数据以使用 POSTMAN 或 PHP cURL 以表格格式向 Microsoft Teams 发送消息
- assembly - 汇编代码 MC68k 。不知何故,一个寄存器被填满了一个数字,即使我不想
- amazon-web-services - AWS Beanstalk Spot 实例类型和排序
- mongodb - MongoDB中的数据不按时间顺序排列