title: Could not find an installed version of Gradle? Ionic v3
body: <p>I have seen questions about this problem but none seems to be like mine.</p>
  
  <p>Suddenly, out of nowhere, began to give this error when I execute the command below:</p>
  
  <pre><code>% sudo ionic cordova run android --release
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Running app-scripts build: --platform android --target cordova
  [14:08:48]  build dev started ...
  [14:08:48]  clean started ...
  [14:08:48]  clean finished in 10 ms
  [14:08:48]  copy started ...
  [14:08:48]  deeplinks started ...
  [14:08:49]  deeplinks finished in 379 ms
  [14:08:49]  transpile started ...
  [14:08:54]  transpile finished in 5.40 s
  [14:08:54]  preprocess started ...
  [14:08:54]  preprocess finished in 1 ms
  [14:08:54]  webpack started ...
  [14:08:54]  copy finished in 6.10 s
  [14:09:05]  webpack finished in 10.83 s
  [14:09:05]  sass started ...
  Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
  [14:09:07]  sass finished in 2.13 s
  [14:09:07]  postprocess started ...
  [14:09:07]  postprocess finished in 18 ms
  [14:09:07]  lint started ...
  [14:09:07]  build dev finished in 18.98 s
  &gt; cordova run android --release
  ANDROID_HOME=/Users/(whoIam)/Library/Android/sdk
  JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
  Error: 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
  
  [ERROR] An error occurred while running cordova run android --release (exit code 1).
  </code></pre>
  
  <p>But the worst of all is that I have Gradle, both in the SDK and Android Studio templates, I honestly do not know what else to do, I've been trying to figure out what the problem is and I can not do it for days.</p>
  
  <p>Here is my environment, if anyone can help me:</p>
  
  <pre><code>% sudo ionic info                                                                                                                                                           
  
  cli packages: (/usr/local/lib/node_modules)
  
      @ionic/cli-utils  : 1.19.1
      ionic (Ionic CLI) : 3.19.1
  
  global packages:
  
      cordova (Cordova CLI) : 7.1.0
  
  local packages:
  
      @ionic/app-scripts : 3.1.8
      Cordova Platforms  : android 6.2.1 ios 4.4.0
      Ionic Framework    : ionic-angular 3.9.2
  
  System:
  
      ios-deploy : 1.9.1
      ios-sim    : 5.0.12
      Node       : v7.0.0
      npm        : 5.3.0
      OS         : macOS High Sierra
      Xcode      : Xcode 9.2 Build version 9C40b
  </code></pre>
  
  <p>Where I have Gradle:</p>
  
  <pre><code>/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
  ~/Library/Android/sdk/tools/templates/gradle/wrapper/gradlew
  
  % sudo cordova requirements                                                                                                                                                 
  
  Requirements check results for android:
  Java JDK: installed 1.8.0
  Android SDK: installed true
  Android target: installed android-27,android-26,android-25,android-24,android-23,android-22,android-21,android-20,android-19,android-18,android-17,android-16,android-15,android-14
  Gradle: not installed
  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
  
  Requirements check results for ios:
  Apple OS X: installed darwin
  Xcode: installed 9.2
  ios-deploy: installed 1.9.1
  CocoaPods: not installed
  CocoaPods was not found. Please install version 1.0.1 or greater from https://cocoapods.org/
  Error: Some of requirements check failed
  </code></pre>
  
  <p>Whe I she the requirements on another project (same machine) it shows gradle installed OK:</p>
  
  <pre><code>Requirements check results for android:
  Java JDK: installed 1.8.0
  Android SDK: installed true
  Android target: installed android-27,android-26,android-25,android-24,android-23,android-22,android-21,android-20,android-19,android-18,android-17,android-16,android-15,android-14
  Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
  </code></pre>
  
  <p>Some says to install gradle, but that makes no sense since it is already installed, and it was working.</p>
  
  <p>Should it be anything regarding permissions? I am not sure of anything anymore, any suggestions? </p>