title: Android SDK Platform 26 license error in Ionic 3
body: <p>I'm trying to run my Ionic 3 project on my Android device with <code>ionic cordova run android --device --stacktrace</code>, but, I've the following output:</p>
  
  <blockquote>
    <p>... </p>
    
    <p>Checking the license for package Android SDK Platform 26 in
    C:\Android\android-sdk\licenses Warning: License for package Android
    SDK Platform 26 not accepted.</p>
    
    <p>FAILURE: Build failed with an exception.</p>
    
    <ul>
    <li>What went wrong: A problem occurred configuring root project 'android'.</li>
    </ul>
    
    <blockquote>
      <p>You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. Before building your project,
      you need to accept the license agreements and complete the
      installation of the missing components using the Android Studio SDK
      Manager. Alternatively, to learn how to transfer the license
      agreements from one workstation to another, go to
      <a href="http://d.android.com/r/studio-ui/export-licenses.html" rel="nofollow noreferrer">http://d.android.com/r/studio-ui/export-licenses.html</a></p>
    </blockquote>
  </blockquote>
  
  <p>Reading other questions, people suggested using the Android Studio SDK manager and installing the latest versions, because then I would be asked about the licenses and would have to accept them, so I installed Android 8.0 (Oreo) and Android API 27 which are the last available updates, however, at no time was I asked about any license and the error persisted. My device is connected to the PC (Windows 10) via the USB cable and the programmer mode is enabled along with USB debugging. What can I do to resolve this?</p>
  
  <p>My SDK manager:</p>
  
  <p><a href="https://i.stack.imgur.com/TcXOF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TcXOF.png" alt="My SDK manager"></a></p>
  
  <p><strong>Update</strong>:</p>
  
  <p>I already ran the command <code>sdkmanager --licenses</code> in the <code>C:\Android\sdk\tools\bin</code> and <code>C:\Users\User\AppData\Local\Android\sdk\tools\bin</code> folders and all the missing licenses were accepted, but the error continues.</p>
  
  <p>My cordova-android version in <code>package.json</code>: <code>"cordova-android": "~6.3.0"</code> and in <code>config.xml</code>: <code>&lt;engine name="android" spec="~6.3.0" /&gt;</code> (already tried with <code>6.3.0</code> and <code>6.2.0</code> without success)</p>
  
  <p>Following the error:</p>
  
  <blockquote>
    <p>Checking the license for package Android SDK Platform 26 in
    C:\Android\android-sdk\licenses Warning: License for package Android
    SDK Platform 26 not accepted.</p>
  </blockquote>
  
  <p>But I don't have the licenses folder in <code>C:\Android\android-sdk</code>, just in <code>C:\Android\sdk</code>. How I do for Ionic check for the folder where the licenses really are?</p>
  
  <p><code>ionic info</code>:</p>
  
  <pre><code>cli packages: (C:\Users\User\AppData\Roaming\npm\node_modules)
  
      @ionic/cli-utils  : 1.19.0
      ionic (Ionic CLI) : 3.19.0
  
  global packages:
  
      cordova (Cordova CLI) : 7.1.0
  
  local packages:
  
      @ionic/app-scripts : 3.1.0
      Cordova Platforms  : none
      Ionic Framework    : ionic-angular 3.9.2
  
  System:
  
      Node : v6.11.2
      npm  : 3.10.10
      OS   : Windows 10
  
  Environment Variables:
  
      ANDROID_HOME : C:\Android\android-sdk
  
  Misc:
  
      backend : pro
  </code></pre>