[ERROR] An error occurred while running cordova build android (exit code 1):

SOLUTION

The issue had to do with the version of gradle i was running.
Thank to @rapropos for pointing me in the right direction, I was starting to lose my mind.The key was in the information i posted in the thread below:

Basically what i did was:

  1. Uninstalled Android Studio to remove gradle version was being used to build my app
  2. Reinstalled a new version of Gradle and updated my brew by running: brew update && brew install gradle
  3. In my project, i then forced a rebuild of my sass as the 2 were out of sync: npm rebuild node-sass --force
  4. Rebuilt the project, by running : ionic cordova build android

I hope this solution helps someone else and saves a few hairs in the process!! :slight_smile:

1 Like