简体   繁体   English

Gradle 构建失败 android Studio

[英]Gradle build failed android Studio

I am facing the issue below when I build my android project, I have tried invalidating caches and restarting android studio but it did not help -;我在构建 android 项目时遇到以下问题,我尝试使缓存无效并重新启动 android 工作室,但它没有帮助 - ;

FAILURE: Build completed with 4 failures. FAILURE:构建完成,有 4 次失败。

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':businessProducts:compileDebugLibraryResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 18 exceptions were raised by workers:
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #38: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #39: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #40: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #41: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #42: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #43: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #44: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #45: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #46: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #47: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #48: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #49: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #50: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #51: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #52: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #53: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #54: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #55: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':contactsview:compileDebugLibraryResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 4 exceptions were raised by workers:
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #64: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #66: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #67: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #70: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':avatarbuttons:compileDebugLibraryResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 11 exceptions were raised by workers:
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #56: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #57: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #58: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #59: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #60: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #61: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #62: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #63: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #65: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #68: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.
     com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-4.0.0-6051327-windows Daemon #69: Daemon startup failed
     Please check if you installed the Windows Universal C Runtime.
     This should not happen under normal circumstances, please file an issue if it does.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeBetaDebugResources'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #72: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #71: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #77: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #74: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #73: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #75: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #78: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.0.0-6051327-windows Daemon #76: Daemon startup failed
        Please check if you installed the Windows Universal C Runtime.
        This should not happen under normal circumstances, please file an issue if it does.

Note: I am running windows 10 and there is no official windows universal C runtime available for it.注意:我正在运行 windows 10 并且没有官方的 windows 通用 C 运行时可用。 I am also running Android gradle plugin 4.0.0 and gradle version 6.1.1我也在运行 Android gradle 插件 4.0.0 和 gradle 版本 6.1.1

I am running windows 10 and there is no official windows universal C runtime available for it我正在运行 windows 10 并且没有官方的 windows 通用 C 运行时可用

This?这个? https://www.microsoft.com/en-us/download/details.aspx?id=48234 https://www.microsoft.com/en-us/download/details.aspx?id=48234

When this occurs on Windows 10, be sure to first contact your security team.当 Windows 10 发生这种情况时,请务必先联系您的安全团队。 For this specific scenario, some components had been disabled/limited by the security team and this issue was resolved once I got in contact with them.对于这种特定情况,安全团队已禁用/限制了某些组件,一旦我与他们联系,此问题就得到了解决。

For Windows 8.1 and below, be sure to first check this answer as well.对于 Windows 8.1 及以下版本,请务必先检查此答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM