gpt4 book ai didi

android - :app:mergeDebugResources FAILED Error: java. util.concurrent.ExecutionException : com. android.builder.internal.aapt.AaptException

转载 作者:搜寻专家 更新时间:2023-11-01 07:44:40 24 4
gpt4 key购买 nike

当我运行 gradlew assembleDebug 时,Jenkins 返回以下错误。在 Android Studio 3.0 中我没有这个问题。有谁知道原因吗?

AAPT err(Facade for 2147483181): \\?\C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.3.1.aar\e9979393938d5eeff956c6f4b76be0a3\res\drawable-xxhdpi-v4\abc_switch_track_mtrl_alpha.9.png ERROR: Unable to open PNG file
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException:

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at

我尝试过的

gradle.properties

android.enableAapt2=false
android.enableBuildCache=true#and false
android.buildCacheDir=c:/temp/

最佳答案

您是否分别应用这些操作?

  • 检查项目的路径。如果路径太长,则将项目向上移动到上层目录。
  • 如果 Path 包含非 ASCII 字符,请更正它。
  • 清除构建缓存。参见 this page了解详情。

在 Windows 上:

gradlew cleanBuildCache

在 Mac 或 Linux 上:

./gradlew cleanBuildCache

  • Go to gradle.properties file, and disable build cache.

    // To re-enable the build cache, either delete the following

    // line or set the property to 'true'.

    android.enableBuildCache=false the other way is to modify build cache dir by adding first line can be skipped because true is the default value by 2.3

    android.enableBuildCache=true

    android.buildCacheDir =c:\temp\

  • 使缓存无效/重新启动然后清理并重建项目

关于android - :app:mergeDebugResources FAILED Error: java. util.concurrent.ExecutionException : com. android.builder.internal.aapt.AaptException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47272220/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com