我正在创建一个flutter应用程序,当我运行我的代码时,我得到了这个错误消息:
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> 有没有人可以指导我解决这个错误?
发布于 2021-05-20 22:50:58
您是否手动将Flutter项目移植到AndroidX?如果是,我建议检查compileSdkVersion并确保它至少设置为28。这个问题似乎类似于这个GitHub issue thread。
https://stackoverflow.com/questions/65858942
复制相似问题