title: Failed to install the following Android SDK packages as some licences have not been accepted on aws instance triggered by jenkins
body: <p>I'm setting up a new Jenkins build for an android app to run tests. I have downloaded android tools on the AWS instance. Then run the following commands to install additional packages to install platforms and build tools.</p>
  
  <p><code>./android update sdk --no-ui --filter build-tools-28.0.3,android-28,extra-android-m2repository./android update sdk --no-ui --filter build-tools-28.0.3,android-28,extra-android-m2repository</code></p>
  
  <p>This downloaded the correct platform and build-tools.</p>
  
  <p>To build the app I run <code>gradlew :app:assembleDebug</code>
  and i'm met with the following error </p>
  
  <p>A problem occurred configuring project ':app'.</p>
  
  <blockquote>
    <p>Failed to install the following Android SDK packages as some licences have not been accepted.
         build-tools;28.0.3 Android SDK Build-Tools 28.0.3</p>
  </blockquote>
  
  <p>I have tried updating the licenses via the sdkmanager with the following commands -</p>
  
  <p>yes | <code>./sdkmanager --licenses &amp;&amp; ./sdkmanager --update</code></p>
  
  <p>and</p>
  
  <p><code>./sdkmanager "build-tools;28.0.3"</code></p>
  
  <p>I am then met with All SDK package licenses accepted.However, when I attempt to build again I get </p>
  
  <blockquote>
    <p>Failed to install the following Android SDK packages as some licences have not been accepted.
         build-tools;28.0.3 Android SDK Build-Tools 28.0.3</p>
  </blockquote>
  
  <p>I have also changed the permissions on the folder structure using chmod 777 </p>