新建Android Studio的Kotlin项目,运行报错:AAPT2 process unexpectedly exit. Error output:
来源:2-6 Gradle 常见问题解决

慕仰7522579
2020-05-14
AAPT2 process unexpectedly exit. Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform artifact 'appcompat.aar (androidx.appcompat:appcompat:1.1.0)' to match attributes {artifactType=android-compiled-dependencies-resources}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\20012101\.gradle\caches\transforms-2\files-2.1\ac4199d79d4b0412da579f23fc82cb0f\appcompat-1.1.0.
> AAPT2 aapt2-3.6.3-6040484-windows Daemon #0: Unexpected error during compile 'C:\Users\20012101\.gradle\caches\transforms-2\files-2.1\ac4199d79d4b0412da579f23fc82cb0f\appcompat-1.1.0\res\drawable-hdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
2回答
-
aapt的问题都是资源不符合要求的问题,日志里面提到的图片按错误信息修改下就行了。
042020-05-14 -
bennyhuo
2020-05-14
这个资源看着是androidx库里面的,建议同学Google一下,可能是版本问题。
052020-05-15
相似问题