Ionic App can't build on Android AAPT Error
Some plugins may encounter incompatibilities due to new updates of Android Support Libraries as explained in other replies here.
Easiest fix is by installing "cordova-android-support-gradle-release" plugin. This plugin will automatically align the version of the plugin which crashed and you can continue to use your plugin.
Also this fix is persistent compared with manually change the version directly into the plugin.
cordova plugin add cordova-android-support-gradle-release --fetch
Also you may have a look into the documentation and other related issue here
This build failure is due to a major version release of the Google Play Services and Firebase libaries on June 17.
Worked for me
Run:
ionic cordova platform rm android
if your using firebase
cordova plugin remove cordova-plugin-firebasecordova plugin add cordova-plugin-firebase-lib
Run:
ionic cordova plugin add cordova-plugin-androidx
- Run:
ionic cordova plugin add cordova-plugin-androidx-adapter
Run:
ionic cordova platform add android@8.0.0
Enjoy with your apk
ionic cordova build android --prod --release
On core Cordova this plugin fixed it for me.
https://github.com/dpa99c/cordova-android-support-gradle-release