【问题标题】:Execution failed for task ':app:processDebugResources'[flutter]任务“:app:processDebugResources”执行失败[flutter]
【发布时间】:2023-04-08 19:40:02
【问题描述】:

我正在为 Android 和 IOS 用户开发一款 Flutter 电子商务应用。当我运行我的代码时,它显示资源错误,我找不到答案。


* 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
     C:\Users\JEYASRI.A\AndroidStudioProjects\flutter_foodapp\build\file_picker\intermediates\library_manifest\debug\AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected element <queries> found in <manifest>.


* 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 47s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Exception: The plugin cloud_firestore could not be built due to the issue above.```

【问题讨论】:

  • 嗨,请用导致错误的代码更新帖子
  • 能否分享您在项目中的 Android 构建 gradle 设置(版本)?

标签: api flutter dart gradle google-cloud-firestore


【解决方案1】:

请注意,您收到以下错误:

 AAPT: error: unexpected element <queries> found in <manifest>.

错误表明 Android Gradle 插件无法识别该元素。

Android 11 introduced &lt;queries&gt; 作为清单元素,旧版本的 Android Gradle 插件没有此元素。

因此,您可能正在使用一个不允许该元素的 Android Gradle 插件

谷歌发布了一些补丁版本来修复这个错误3.3.33.4.33.5.43.6.44.0.1。。 p>

因此,请将您的构建 gradle 版本升级到上述列表中的一个。

Android Studio 4.1 或更高版本,具有匹配的 Android Gradle 插件(例如4.1.* 系列)确实可以识别清单元素,因此它们不会遇到这些类型的错误。

查看the Android Developers Blog post

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-16
    • 2016-05-05
    • 2021-12-06
    • 2015-08-27
    • 2021-04-28
    • 1970-01-01
    • 2016-08-04
    • 2017-07-23
    相关资源
    最近更新 更多