local .aar file cannot be supported
<p>I try to add a local <code>.aar</code> file to the project as it is described <a href="https://stackoverflow.com/questions/28051137/update-module-created-from-local-aar">here</a>, because I don't want to implement <a href="https://stackoverflow.com/questions/37328123/get-updates-of-aar-file">this</a> routine each time when I change my library code.</p>

<p>So in my project <code>build.gradle</code> file I added:</p>

<pre><code>repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
</code></pre>

<p>Both my library and my app have two flavours - <code>alphaTest</code> and <code>myRelease</code>.  I want each library to be added strictly to the corresponding flavour of the app.</p>

<p>And in <code>build.gradle</code> of my app I have the following <code>dependencies</code> block:</p>

<pre><code>dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar', '**/*.aar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    alphaTestCompile files ('libs/myLib-alphaTest-release.aar')
    myReleaseCompile files('libs/myLib-myRelease-release.aar')
}
</code></pre>

<p>Unfortunately as a result I always receive this kind of error:</p>

<pre><code>Error:Project myApp: Only Jar-type local dependencies are supported. Cannot handle: C:\Users\...\myApp\libs\myLib-myRelease-release.aar
</code></pre>

<p>I tryed to use this format</p>

<pre><code>alphaTestCompile  ('my.package:libs/myLib-alphaTest-release:0.1@aar')
</code></pre>

<p>and also this</p>

<pre><code>alphaTestCompile  (name:'myLib-alphaTest-release', ext:'aar')
</code></pre>

<p>but in this case the gradle cannot event resolve the files. </p>

<p>How can I make <code>.aar</code> files also be compiled?</p>