title: Ionic 3: Can't build Android since updating Cordova etc
body: <p>My Ionic 3 project won't build for Android any more.  Serving to the browser is working.  I've tried in numerous combinations:</p>
  
  <ul>
  <li>removing android platform</li>
  <li>updating cordova / ionic</li>
  <li>re-adding platform</li>
  <li>updating the already installed Android Studio SDK tools</li>
  <li>head-butting the computer</li>
  <li>downgrading to 6.4.0 by doing:
  
  <ul>
  <li>ionic cordova remove platform android</li>
  <li>ionic cordova add platform android@6.4.0</li>
  <li>ionic cordova build android</li>
  </ul></li>
  </ul>
  
  <p>…and am still getting the same build error as below.</p>
  
  <p>I just can't get it to build, not even the official Ionic docs have any info.  Any ideas?  </p>
  
  <p><strong>Note:</strong> There are loads of outdated answers on the net that haven't worked, so please don't just mark this as a duplicate, as the solution needs to be up to date.</p>
  
  <p><strong>Error message in console:</strong></p>
  
  <pre><code>ANDROID_HOME=/Users/daveshirman/Library/Android/sdk
  JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
  studio
  (node:16020) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Could not find an installed version of Gradle either in Android Studio,
  or on your system to install the gradle wrapper. Please include gradle 
  in your path, or install Android Studio
  </code></pre>
  
  <p><strong>Here's my system version info:</strong></p>
  
  <pre><code>Davids-MBP:apphazard-app daveshirman$ ionic info
  
  cli packages: (/Users/daveshirman/Documents/Work/AppHazard/apphazard-app/node_modules)
  
      @ionic/cli-utils  : 1.19.1
      ionic (Ionic CLI) : 3.19.1
  
  global packages:
  
      cordova (Cordova CLI) : 8.0.0 
  
  local packages:
  
      @ionic/app-scripts : 3.0.0
      Cordova Platforms  : android 7.0.0
      Ionic Framework    : ionic-angular 3.7.1
  
  System:
  
      ios-deploy : 1.9.2 
      ios-sim    : 5.0.8 
      Node       : v6.10.0
      npm        : 3.10.10 
      OS         : macOS High Sierra
      Xcode      : Xcode 9.2 Build version 9C40b 
  
  Environment Variables:
  
      ANDROID_HOME : not set
  
  Misc:
  
      backend : pro
  </code></pre>