1

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?

9
  • What are you calling before flutter run? Are your IDE don't showing errors in code? Commented Jan 23, 2021 at 13:55
  • @fartem, I am using VSCode and the IDE is showing the error Commented Jan 24, 2021 at 4:25
  • Can you add an error from IDE to the question? Commented Jan 24, 2021 at 5:21
  • I have already added the error, what else do you want? Let me know and I'll add it Commented Jan 24, 2021 at 5:29
  • Error not from console, have you get an error in Visual Editor? Commented Jan 24, 2021 at 5:31

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.