当前位置: 首页 > 知识库问答 >
问题:

Android Studio与aapt2窗口问题

何浩荡
2023-03-14

生成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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\a157a67bfc76ea22b4e9dc6044784dd7\jetified-ccl-2.8.4.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #2: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\a157a67bfc76ea22b4e9dc6044784dd7\jetified-ccl-2.8.4\res\drawable-nodpi\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-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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\f16f566ea15ba090a84a7c7a392d5912\jetified-play-services-cast-framework-15.0.1.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #1: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\f16f566ea15ba090a84a7c7a392d5912\jetified-play-services-cast-framework-15.0.1\res\drawable-nodpi-v4\cast_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Nicolas\.gradle\caches\transforms-2\files-2.1\050caa3f0d7bdb092be2c6731bb1be21\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_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.

共有2个答案

祁远
2023-03-14

我对最新的gradle 4.1.3有过类似的经历。它也坏了。

尝试了4.0.0,一切正常,然后看到了这篇文章,所以我尝试了4.0.2,如@Nicolas Alberto在上一个答案中提到的。但是(工作)编译4.0.0给了我一个弃用警告:

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

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

葛海阳
2023-03-14

显然,windows或处理器gradle 4.1.1或4.1.0不起作用并生成错误aapt2。一旦我将gradle的版本更改为4.0.2,它就完美地工作了。

 类似资料:
  • pre { white-space: pre-wrap; } Layout 组件可以内嵌在窗口(window)中。我们可以创建一个复杂的布局窗口,甚至不需要写任何的 js 代码。jquery-easyui 框架帮我们在后台做渲染和调整尺寸。 作为一个实例,我们创建一个窗口(window),它包含两个部分,一个放置在左边一个放置在右边。在窗口(window)的左边我们创建一个树形菜单(tree),在

  • 我有一个拼花地板数据表,结构如下: null null 我已经调整了以下设置,希望降低总时间: spark.memory.storagefraction 0.02 spark.sql.windowexec.buffer.in.memory.threshold 100000 spark.sql.constraintpropagation.enabled false 第二种方法帮助防止了日志中出现的一

  • 我正在使用Jenkins构建我的android应用程序。当我试图构建任务“Assemble”时,有一个问题。 我已经添加了,但仍然有这个问题。 错误:

  • 我的代码创建了一个窗口,并按照我想要的方式排列它...最初。但是,如果我最大化窗口,边框窗格的顶部和底部不会留在中心。它们漂移到左上角和左下角。 我试着禁用最大化窗口选项,但它又一次打乱了页面的外观,顶部和底部都在移动。 这是我的代码: 我昨晚才开始自学JavaFX,但似乎无法弄清楚我哪里出了问题,或者找到了解决问题的方法。 提前感谢任何建议。

  • 介绍 前文已经介绍过了TCP滑动窗口大小的重要性。在客户端与服务器的连接中,客户端告知服务器它一次希望从服务器接收多少字节数据,这是客户端的接收窗口,即服务器的发送窗口。类似地,服务器告知客户端一次希望从客户端接收多少字节数据,也就是服务器的接收窗口和客户端的发送窗口。 要理解为什么窗口大小会产生波动,首先需要理解它的含义。最简单的方式是它代表了设备对于特定连接的接收缓存大小。即,窗口大小代表一个

  • 窗口的创建与控制 进程:主进程​ 1 //在主进程中. 2 const {BrowserWindow} = require('electron') 3 ​ 4 //或者从渲染器进程中使用 `remote`. 5 // const {BrowserWindow} = require('electron').remote 6 ​ 7 let win = new BrowserWindow({width