Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio @aar import creating incorrect exploded-aar directory

So, here's the thing, I have a .aar file, and when i add it as a dependency as follows:

compile('com.foo:bar:1.0.0@aar')

It generates the following file:

build > intermediates > exploded-aar > com.foo > bar > bar-1.0.0

which contains the classes.jar, sources, etc.

However, it SHOULD be doing the following:

build > intermediates > exploded-aar > com.foo > bar > 1.0.0

Does anyone have any clue as to why my aar isn't being imported correctly?

This is a problem, as the following error occurs when building the gradle:

com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: /build/intermediates/exploded-aar/com.foo/bar/1.0.0/AndroidManifest.xml (No such file or directory)

However, it is clearly visible in the bar-1.0.0 directory.

Edit: more info

  • Tested on 5 machines. All running AS 0.8.9, fresh install, fresh clone.
  • Jdk 1.6 and 1.7 tested
  • --refresh-dependencies called to make sure any changes have been collected

Nothing works.

like image 292
VicVu Avatar asked Sep 15 '14 19:09

VicVu


1 Answers

I wasn't going to answer my own question but I will now that I've received a few votes.

It turns out, the minSDK that was defined in my build.gradle wasn't installed.

Once I installed the proper SDKs, everything worked fine.

like image 110
VicVu Avatar answered Oct 01 '22 14:10

VicVu