【问题标题】:Flutter: Execution failed for task ':app:processDebugResources'Flutter:任务“:app:processDebugResources”执行失败
【发布时间】:2022-03-25 08:29:54
【问题描述】:

我在尝试在 Android 上构建 Flutter 应用时收到此错误消息。自从我几天前开始这个项目以来,它运行良好。在 IOS 模拟器上做了一些测试后,我不得不再次在 Android 上尝试一些东西,并且无法再构建它。

Launching lib/main.dart on AOSP on IA Emulator in debug mode...

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.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     ERROR:/Users/Antonio/Dropbox/Flutter/wader/build/app/intermediates/packaged_manifests/debug/AndroidManifest.xml:22: AAPT: error: 'orientation|keyboardHidden|keyboard|viewsize|smallestviewsize|locale|layoutDirection|fontScale|screenLayout|density|uiMode' is incompatible with attribute configChanges (attr) flags [colorMode=16384, density=4096, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, locale=4, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512].


* 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 1m 40s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin connectivity...

FAILURE: Build failed with an exception.

* What went wrong:
Task 'assembleAarRelease' not found in root project 'connectivity'.

* Try:
Run gradlew tasks to get a list of available tasks. 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 4s
Exception: The plugin connectivity could not be built due to the issue above.
Exited (sigterm)

这是我的颤振医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on Mac OS X 10.15.7 19H1030 darwin-x64,
    locale en-AE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.44.0)
[✓] VS Code (version 1.43.2)
[✓] Connected device (2 available)

• No issues found!

有什么想法吗?

【问题讨论】:

  • 忽略,我设法通过创建一个新的 Flutter 项目并将 lib 文件夹复制到其中来修复它。

标签: android flutter build


【解决方案1】:

使用 Android Studio,我创建了一个新的 Flutter 项目并复制了以下文件:

【讨论】:

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