Help with BUILD FAILED Android Ionic


What does that do exactly?


I don’t know why, but i think the problem is relational with API 26 Android and cordova.


I have this same problem.

adding multiDexEnabled true didn’t help.

I am not comfortable editing the build files if this is something Ionic can do. Because I never know if which ones get generated on the fly.

Build of Android APK failed with Push Notification and Badge in project

thanks happy new year ,Your solution helped me very much

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
multiDexEnabled true


thank you @doriantorres84. Your solution works on cordova-android@6.3.0 and cordova-android@6.4.0. So, here make it more detail.

  • open platform/android/build.gradle
  • find android {
  • add this inside
    defaultConfig {
     minSdkVersion 21
     targetSdkVersion 26
     multiDexEnabled true
  • it should looks like this
android {
    defaultConfig {
     minSdkVersion 21
     targetSdkVersion 26
     multiDexEnabled true

    //the rest...


Thanks so much for this!


Please help me this is not working for me :confused: Now im getting this.


Thanks! it works for me


Try cordova clean. Saved my day.


Thank you for your reply! “cordova clean” saved my day too!


Thank you @codiqa100051260
Nice Find


Funciono!!! gracias It works thks “cordova clean”


I tried with “cordova clean”, but I did not work.

Somebody could help me with another solution.



cli packages: (/Users/wilfredonoyola/workspace/statusfy/sf-ionic-1/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.10
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2 
    Node              : v6.11.3
    npm               : 3.10.10 
    OS                : macOS High Sierra
    Xcode             : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

    ANDROID_HOME : /Users/wilfredonoyola/Library/Android/sdk/


    backend : pro


cordova clean for the win, AFTER adding the multiDexEnabled true to the platform/android/build.gradle file.

Unable to build Ionic app on android

Thanks this worked for me too.


npm i cordova-plugin-multidex Helped for me


Thanks @codiqa100051260, You helped me. I was getting this error after removing a cordova plugin.


Thanks for this. It was all I needed do to. I didn’t have to update the build.gradle file.

As with @virendrashakya, it was after I had removed, then updated a cordova plugin. It was related to the ionic webview vulnerability recently reported. Although Android isn’t affected, I thought I’d better just rebuild my Android version anyway.


thank you .It worked for me too


this worked for me: cordova plugin add --save

as found at