title: Adding local .aar files to my gradle build
body: <p>So I have created an Android library and successfully compiled it into a .aar file. I called this aar file: <code>&quot;projectx-sdk-1.0.0.aar&quot;</code>. Now I want my new project to depend on this aar so what I have done is follow <a href="http://life.nimbco.us/referencing-local-aar-files-with-android-studios-new-gradle-based-build-system/" rel="nofollow noreferrer">this post</a>.</p>
  <p>But the post confuses me since I do not get the desired result:</p>
  <blockquote>
  <p>The package name of the aar is : <code>com.projectx.photosdk</code> and the module inside is called <code>sdk</code></p>
  </blockquote>
  <p>Here is my current project structure:</p>
  <pre><code>|-SuperAwesomeApp
  |--.idea
  |--gradle
  |--App
  |---aars
  |----projectx-sdk-1.0.0.aar
  |---build
  |---jars
  |---src
  |---build.gradle
  </code></pre>
  <p>And here is my Gradle build file:</p>
  <pre><code>apply plugin: 'android'
  
  buildscript {
      repositories {
          mavenCentral()
          flatDir {
              dirs 'aars'
          }
      }
  }
  
  android {
      compileSdkVersion 19
      buildToolsVersion &quot;19.0.1&quot;
  
      defaultConfig {
          minSdkVersion 11
          targetSdkVersion 19
          versionCode 1
          versionName &quot;1.0&quot;
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  
  dependencies {
      compile 'com.android.support:gridlayout-v7:19.0.1'
      compile 'com.android.support:support-v4:19.0.1'
      compile 'com.android.support:appcompat-v7:19.0.1'
  
  
      compile 'com.projectx.photosdk:sdk:1.0.0@aar'
  //    compile files( 'aars/sdk-1.0.0.aar' ) // Does not work either
  }
  </code></pre>
  <p><strong>EDIT</strong></p>
  <p>The errors I am getting:</p>
  <pre><code>Failed to refresh Gradle project 'SuperAwesomeApp'
       Could not find com.projectx.photosdk:sdk:1.0.0.
       Required by:
       SuperAwesomeApp:App:unspecified
  </code></pre>