0

I'm Working On Android Project When I Try To Build it says Failed " FAILURE: Build failed with an exception." Here is the Complete Error What I Get

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> 8 exceptions were raised by workers:
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #0: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #1: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #2: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #3: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #4: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #5: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #6: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.
  com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.2-5326820-windows Daemon #7: Daemon startup failed
  This should not happen under normal circumstances, please file an issue if it does.

In gradle-wrapper.properties distributionUrl is https://services.gradle.org/distributions/gradle-5.1.1-all.zip and in build.gradle dependencies are

com.android.tools.build:gradle:3.4.2
com.google.gms:google-services:4.3.3

How Can I Solve This Error.

Vishal Gupta
  • 108
  • 10

1 Answers1

0

Things you can try

1.try clean/rebuild your project this worked for me.

  1. Try downgrading your gradle version

    dependencies {
                classpath 'com.android.tools.build:gradle:1.5.0'
                               }
    

3.You may have corrupted drawable file. Search if any and remove it.

  1. Try invalidate caches/Restart android studio.
Abhishek
  • 46
  • 1
  • 6
  • When I Downgrade to com.android.tools.build:gradle:3.2.1 com.google.gms:google-services:4.2.0 it works but shows registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) – Vishal Gupta Jul 07 '20 at 11:02
  • check this https://stackoverflow.com/questions/46984770/registerresgeneratingtask-is-deprecated-use-registergeneratedfoldersfilecollec/48309373 – Abhishek Jul 08 '20 at 09:46