android - 颤振发布apk错误:任务':app:lintVitalRelease'执行失败
问题描述
我不能再发布我的应用程序了。我正在使用 AndroidStudio 4.0 和颤振 sdk 版本 1.17.5 。我上个月发布了两次我的应用程序,但现在我真的不知道错误的原因是什么。当我输入flutter build apk --release
终端时,会出现这些错误:
Running Gradle task 'assembleRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:profileRuntimeClasspath'.
> Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: ....\build\app\intermediates\flutter\profile\libs.jar.
> Failed to transform '....\build\app\intermediates\flutter\profile\libs.jar' using Jetifier. Reason: FileNotFoundException, message: ....\build\app\intermediates\flutter\profile\libs.jar (The system cannot find the path specified). (Run with --stacktrace for more details.)
Please file a bug at http://issuetracker.google.com/issues/new?component=460323.
* 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 42s
Running Gradle task 'assembleRelease'... 43.4s
Gradle task assembleRelease failed with exit code 1
解决方案
如果错误是关于profile/libs.jar
,请在终端中执行以下操作:
flutter build apk --profile
进而
flutter build apk --release
解决了这个问题。
如果错误是关于 debug/libs.jar
flutter build apk --debug
进而
flutter build apk --release
会解决问题
推荐阅读
- javascript - 节点:使用变量替换管理 SQL 文件
- javascript - 动态 iframe 向父级发送数据
- angular - 如何在 ActivatedRoute 上设置数据以进行观众测试?
- python - 显然相等的字符串在 Python 中不相等
- linux - 有没有办法在 Linux 上获取 io_setup() 调用事件数量的内部限制?
- python - 我的简单神经网络难以学习线性函数
- node.js - 使用 multer 和 mimeType 堆叠多个图像上传和编辑
- python - 当装饰方法/函数的参数数量超过时,@mock.patch 装饰器在 Python 中会做什么?
- r - 实体嵌入与 1d cnn keras R 连接
- asp.net-core - 在 ASP.NET Core Identity 中创建寿命较短的令牌