【Gradle 構成】AAPT2 aapt2-7.0.3-7396180-windows デーモン #0: リンク中に予期しないエラーが発生しました

コンパイルエラーログ:

1: Task 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
   > AAPT2 aapt2-7.0.3-7396180-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
     This should not happen under normal circumstances, please file an issue if it does.

 エラー処理:

これは、同じプロジェクト内に複数のモジュールが存在しますが、それらはすべて com.android.application プラグインで構成されているためです。

そのうちの 1 つを com.android.library に変更する必要があります

参考記事:

Android Gradle ビルド エラー「AAPT2 aapt2-4.1.0-6503028-windows デーモン #0: リンク中に予期しないエラーが発生しました。デーモンを停止しようとしています。」

おすすめ

転載: blog.csdn.net/xiaoyu_wu/article/details/129863092