I'm having the same problem, on Friday I did the build normally and on Monday when trying to perform again I get the error 'Execution failed for task': app: processDebugResources'" plus some stacktrace on Aapt2Exception: AAPT2 error.
Apparently this has to do with Google launching new versions of support-v4 and api-level update
this link say that installing the cordova-android-support-gradle-release plugin solves the problem.
add the code below in build.gradle in the platforms/android directory
configurations.all {
resolutionStrategy.force 'com.android.support:support-v4:27.1.0'
}
In my case it did not solve, but I may have done something wrong, I hope it will solve.
--- UPDATE 1
Google has released an update of Google Play service libraries and Firebase on June 17, 2019, I believe our problem is directly related to this. They recommend the following settings:
- Upgrade com.android.tools.build:gradle to v3.2.1 or later.
- Upgrade compileSdkVersion to 28 or later.
- Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
In the case of Cordova applications I still do not know exactly how to reflect these changes and I'm in the middle of a release cycle of an update of my app, without being able to build, it's really sad :(
--- UPDATE 2
I have found a solution for now by editing the project.properties file that is inside the platforms/android directory.
I changed all the libs that are in this file as "+" to a fixed version number prior to the version number released in the release on the 17th, you can check this here but this is still not an optimal solution since this file can be deleted if you need to remove and reinclude the platform.
--- UPDATE 3
As Leonardo explained this problem occurs because of the update of the firebase and play service libraries and the auto update of the cordova dependencies. It is possible to fix this using the configurations.all code in a build-extras.gradle file in the root directory of the project + hooks to automate the copy of the setup to within platform/android as explained in that link
PS:Sorry for my bad English.