1. Error:execution failed for task ' mergedebugandroidtestresources '.
> Error:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:
The reason I've seen it at the moment is to manually change the name of the resource suffix.
For example, to manually change the logo.jpg to Logo.png, this exception will occur, because it is actually JPG format picture, Android Studio is based on the suffix PNG as PNG image as a result of the merge optimization when an exception occurs.
Workaround: Just do not change the suffix name.
If it is a PNG picture, to change, you can add the following two sentences to Build.gradle, which means ignoring PNG strict check:
Android {
Aaptoptions.cruncherenabled = False
Aaptoptions.usenewcruncher = False
}
2. Error:execution failed for task ': App:mergedebugresources '.
> Error:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:
There are different types of resources of the same name in different directories between different modules or the same module, compared to slices.
Because this is two different types of resources but the names are the same, all cause resource merging exceptions. For example, there are both Logo.png and logo.jpg.
Workaround: Find the resource with the same name and modify it to a different name.
Android Studio appears java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException summary and workaround