title: ionic 3 cli 'ionic cordova run android' command throws an error
body: <p>I updated the cli to ionic 3 version and when i run </p>
  
  <blockquote>
    <p>ionic cordova run android</p>
  </blockquote>
  
  <p>to build apk file and run in android emulator I got this error</p>
  
  <pre><code>    C:\Users\XXXX\Desktop\beep&gt;ionic cordova run android
  Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser
  
  [20:52:20]  build dev started ...
  [20:52:20]  clean started ...
  [20:52:20]  clean finished in 11 ms
  [20:52:20]  copy started ...
  [20:52:20]  transpile started ...
  [20:52:22]  transpile finished in 2.53 s
  [20:52:22]  preprocess started ...
  [20:52:22]  deeplinks started ...
  [20:52:23]  deeplinks finished in 52 ms
  [20:52:23]  preprocess finished in 54 ms
  [20:52:23]  webpack started ...
  [20:52:23]  copy finished in 2.77 s
  [20:52:31]  webpack finished in 8.53 s
  [20:52:31]  sass started ...
  [20:52:32]  sass finished in 1.11 s
  [20:52:32]  postprocess started ...
  [20:52:32]  postprocess finished in 7 ms
  [20:52:32]  lint started ...
  [20:52:32]  build dev finished in 12.29 s
  &gt; cordova run android
  ANDROID_HOME=C:\Users\XXXX\AppData\Local\Android\sdk
  JAVA_HOME=C:\Program Files\java\jdk1.8.0_101
  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] Cordova encountered an error.
          You may get more insight by running the Cordova command above directly.
  
  [ERROR] An error occurred while running cordova run android (exit code 1).
  </code></pre>
  
  <p>what I already tried to do and it not helps:
   1. removed android studio and install again.
   2. run these commands</p>
  
  <pre><code>cordova platform rm android
  cordova platform add android
  npm cache clear
  </code></pre>
  
  <ol start="3">
  <li>update the sdk in android studio</li>
  </ol>
  
  <p>nothing really helps to solve this issue.</p>