Android build :app:checkDebugDuplicateClasses FAILED

I’m getting this error when trying to build for android.

the cause of the error seems to be the cordova plugin cordova-plugin-admobpro@2.49.0 installed alongside the meteor package accounts-google.
From stackoverflow firebase - Execution failed for task ':app:checkDebugDuplicateClasses'. Ionic4 Android - Stack Overflow I’ve seen that to resolve this issue I could change the file gradle.properties to have

android.enableJetifier=true
android.useAndroidX=true

which I have done, but when I try to build, it changes the properties back to false.

Is there a way to specify the gradle.properties like we do with App.appendToConfig?

Thanks