Ionic App can't build on Android AAPT Error Ionic App can't build on Android AAPT Error angular angular

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:

  1. ionic cordova platform rm android

  2. if your using firebase

    cordova plugin remove cordova-plugin-firebasecordova plugin add cordova-plugin-firebase-lib
  3. Run:

ionic cordova plugin add cordova-plugin-androidx

  1. Run:

ionic cordova plugin add cordova-plugin-androidx-adapter

  1. Run:

    ionic cordova platform add android@8.0.0

Enjoy with your apk

ionic cordova build android --prod --release