title: How do I use a library with my Android project using Gradle?
body: <p>I'm only just starting with Android development so I'm sure this is incredibly basic and a dumb question, but I'm getting the following error when I try and include a library to use in my code with Gradle:</p>
  
  <pre><code>Gradle 'MyApp' project refresh failed: You are using an old, unsupported version of Gradle. Please use version 1.6 or greater.
  </code></pre>
  
  <p>The library I'm trying to use is <a href="https://github.com/koush/ion" rel="nofollow noreferrer">ION</a>. All I've tried so far is adding the following lines into the <code>build.gradle</code> file. </p>
  
  <pre><code>dependencies {
      compile 'com.koushikdutta.ion:ion:1.1.5'
  }
  </code></pre>
  
  <p>Which I guessed at based on <a href="https://github.com/koush/ion#gradle" rel="nofollow noreferrer">this</a> section of Koush's GitHub account, but what else do I need to do? Still download the jar and put it somewhere? I <em>have</em> looked at other questions/searched for guides on the basics of Gradle, but bizarrely I can't find a solid, definitive answer.</p>
  
  <p>And how do I upgrade Gradle? Can it be done from within Android studio? I'm using Android Studio 0.2.13 on Windows 7 64bit:</p>
  
  <p><strong>SOLUTION:</strong> - Make sure you're putting the dependencies in the correct build.gradle file! Doh! It should be in the one just above your src folder, not the root! </p>
  
  <p><img src="https://i.stack.imgur.com/AtKse.jpg" alt="Android Studio Version"></p>