title: What is the difference between compile fileTree & Complile jar in Android Studio?
body: <p>This is not a coding error. this is just about usage of Android studio. I tried to google and find proper solution, but I couldn't.</p>
  
  <p>In an Android studio project there is XYZ.jar file in lib folder. I can use it for compiling as below in gradle.</p>
  
  <pre><code>compile fileTree(include: ['*.jar'], dir: 'libs')
  </code></pre>
  
  <p>Then I can add same file as dependency also.</p>
  
  <blockquote>
    <p>File --> Project Structure<br>
    Select App from Module<br>
    Dependency -> +  File dependency</p>
  </blockquote>
  
  <p>Then Gradle change as below</p>
  
  <pre><code>compile files('libs/XYZ.jar')
  </code></pre>
  
  <p>What is the difference between these compile <strong>fileTree &amp; compile files ?</strong></p>
  
  <p>If we add a jar as a dependency, will it go with generated APK ? </p>