安卓工作室与aapt2窗口问题



生成apk时android studio中的Aapt2错误当我将android studio更新到4.1.1时,这个问题就开始了。我已经卸载并安装了它,我逐渐删除了它。我已经做了几个过程,但我无法解决问题。

图像错误

Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform ccl-2.8.4.aar (com.google.android.libraries.cast.companionlibrary:ccl:2.8.4) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.1a157a67bfc76ea22b4e9dc6044784dd7jetified-ccl-2.8.4.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #2: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.1a157a67bfc76ea22b4e9dc6044784dd7jetified-ccl-2.8.4resdrawable-nodpialbum_art_placeholder.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-cast-framework-15.0.1.aar (com.google.android.gms:play-services-cast-framework:15.0.1) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.1f16f566ea15ba090a84a7c7a392d5912jetified-play-services-cast-framework-15.0.1.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #1: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.1f16f566ea15ba090a84a7c7a392d5912jetified-play-services-cast-framework-15.0.1resdrawable-nodpi-v4cast_album_art_placeholder.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:UsersNicolas.gradlecachestransforms-2files-2.150caa3f0d7bdb092be2c6731bb1be21jetified-play-services-base-17.1.0resdrawable-xhdpi-v4common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.

显然,windows中一定存在一些错误,或者处理器级别4.1.1或4.1.0不起作用,并生成错误aapt2。当我将gradle的版本更改为4.0.2时,它就完美地工作了。

我对最新的gradle 4.1.3也有类似的体验。它也坏了。

尝试了4.0.0,一切都很好,然后看到了这篇帖子,所以我尝试了@Nicolas Alberto在之前的回答中提到的4.0.2。但是使用4.0.0的(工作(编译给了我一个弃用警告:

"Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0."

显然,这是无法容忍的,但如果你使用4.0.0,也许你的错误会得到解决,就像我的错误一样。

最新更新