【发布时间】:2021-11-06 16:10:22
【问题描述】:
我正在尝试在 Visual Studio Code 中构建 App Bundle,但它总是失败并显示:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:shrinkReleaseResources'.
> org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 7; Attribute "keep" bound to namespace "http://schemas.android.com/tools" was already specified for element "resources".
* 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
这是我在项目中使用的依赖项:
dependencies:
flutter:
sdk: flutter
sqflite: ^2.0.0+3
intl: ^0.17.0
syncfusion_flutter_calendar: ^19.2.62
provider: ^5.0.0
cupertino_icons: ^1.0.2
material_design_icons_flutter: ^5.0.5955-rc.1
curved_navigation_bar: ^1.0.1
responsive_text_field: ^0.1.4
flutter_datetime_picker: ^1.5.1
datetime_picker_formfield: ^2.0.0
flutter_local_notifications: ^8.1.1+1
table_calendar: ^3.0.2
shared_preferences: ^2.0.8
shared_preferences_web: ^2.0.2
firebase_auth: ^3.1.2
cloud_firestore: ^2.5.3
firebase_core: ^1.7.0
flutter_spinkit: ^5.1.0
fluttertoast: ^8.0.8
image_picker: ^0.8.4+2
image_cropper: ^1.4.1
photo_view: ^0.13.0
rxdart: ^0.27.2
badges: ^2.0.1
profanity_filter: ^2.0.0
当我遇到问题时,我什么时候运行--stacktrace 来找出错误。我在终端中尝试过,但那里似乎没有 stacktrace 命令。
【问题讨论】:
-
请将代码和数据添加为文本 (using code formatting),而不是图像。图片:A)不允许我们复制粘贴代码/错误/数据进行测试; B) 不允许根据代码/错误/数据内容进行搜索;和many more reasons。除了代码格式的文本之外,只有在图像添加了一些重要的东西,而不仅仅是文本代码/错误/数据传达的内容时,才应该使用图像。
-
看起来你必须检查你的 android XML 资源。也许你添加了工具:保持两次。
-
分享你的 AndroidManifest.xml 文件,我猜问题出在你的 XML 文件上,你在配置 firebase 时是否对其进行了编辑?
标签: flutter