如何修复错误 - 执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障
Posted
技术标签:
【中文标题】如何修复错误 - 执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障【英文标题】:How to fix error - failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade 【发布时间】:2021-04-27 17:36:52 【问题描述】:我正在创建一个颤振应用程序,当我运行我的代码时,我收到以下错误消息:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\aayus\OneDrive\Desktop\MYP 5\IB Unit ICT\flutter app buddy\flutter_application_buddy> & 'c:\Users\aayus\OneDrive\Desktop\MYP 5\IB Unit ICT\flutter app buddy\flutter_application_buddy\lib\main.dart'
PS C:\Users\aayus\OneDrive\Desktop\MYP 5\IB Unit ICT\flutter app buddy\flutter_application_buddy> flutter run
Launching lib\main.dart on AC2001 in debug mode...
Parameter format not correct -
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
AAPT: error: failed to open APK: Invalid file.
* 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 14s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 15.3s
Exception: Gradle task assembleDebug failed with exit code 1
PS C:\Users\aayus\OneDrive\Desktop\MYP 5\IB Unit ICT\flutter app buddy\flutter_application_buddy>
有人可以指导我解决这个错误吗?
【问题讨论】:
flutter run
之前你在打什么电话?您的 IDE 是否没有显示代码错误?
@fartem,我正在使用 VSCode,IDE 显示错误
你能在问题中添加一个来自 IDE 的错误吗?
我已经添加了错误,你还想要什么?告诉我,我会添加它
错误不是来自控制台,您是否在可视化编辑器中收到错误?
【参考方案1】:
您是否手动将 Flutter 项目迁移到 AndroidX?如果是,我建议检查compileSdkVersion
并确保它至少设置为28。这个问题似乎与GitHub issue thread 类似。
【讨论】:
以上是关于如何修复错误 - 执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障的主要内容,如果未能解决你的问题,请参考以下文章
执行 scikit-learn 剪影分数时如何修复内存错误?
如何修复在 Spyder 5.0.3 中执行 pip 时出现的错误
如何修复错误:在 Elastic Beanstalk 上永久找不到 pg_config 可执行文件
如何在 Windows 上修复“gyp ERR!堆栈错误:找不到 Python 可执行 python”?
如何修复错误 - 执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障