programmer
programmer

Reputation: 35

How to fix error - failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

I am creating a flutter app and when I run my code, I get this error message:

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> 

Can someone please guide me with this and help me fix this error?

Upvotes: 1

Views: 11412

Answers (1)

Omatt
Omatt

Reputation: 10519

Did you manually migrate your Flutter project to AndroidX? If yes, I suggest checking the compileSdkVersion and make sure that it's at least set to 28. This issue seems to be similar to this GitHub issue thread.

Upvotes: 1

Related Questions