I had to remove this from my config.xml to get a successful build: <engine name="android" spec="10.1.1" />
I was targeting android sdk 30.
Nothing changed from a few days ago when the builds were successful except some code in my “www”. Plugins, config.xml, etc all unchanged.
Error from the build:
`FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.1.
AAR metadata file: /Users/agent04/.gradle/caches/transforms-3/73e09204760ea4755dc4d86cf2bf4d4f/transformed/work-runtime-2.7.1/META-INF/com/android/build/gradle/aar-metadata.properties.`
The problem seems to be this plugin: onesignal-cordova-plugin.
Since you don’t specify which version you want, it grabs the latest version. It was updated just a couple of days ago, which would account for your app suddenly stopping working.
You might want to dig into that a bit and perhaps specify an older version of the plugin. The maintainer may also be able to shed a light on what is going on.
I upgraded onesignal to 3.0.1 locally and ran into the same issue as well. Thanks again for figuring out the root cause. I will keep it at 3.0.0 for the time being as this appears to be their problem.