【Gradle配置】AAPT2 aapt2-7.0.3-7396180-windows Daemon #0: Unexpected error during link

编译报错日志:

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.

【Gradle配置】AAPT2 aapt2-7.0.3-7396180-windows Daemon #0: Unexpected error during link_第1张图片

 报错处理:

这是因为同一个工程中有多个 module,但都配置了 com.android.application 这个插件。

需要将其中一个改为 com.android.library

参考文章:

Android Gradle build error "AAPT2 aapt2-4.1.0-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon."

你可能感兴趣的:(Android,App,编译报错,android,gradle)