Feature Request: AAR file compliance

Issue #51 new
Carl Henrik Janson
created an issue

If I understand things correctly, when you build projects containing libraries created in Android Studio, then these libraries are often delivered in the AAR format. Hence, AAR compliance would be good.

Comments (7)

  1. Carl Henrik Janson reporter

    I am a bit ignorant and my request is "weak". If you say that the Android SDK team now "is back to" JAR, then it is perhaps better to have some patience and wait for this to migrate? The reason I put it here, is that I last week had to follow an AAR to JAR conversion (like the one you have linked) in order to build a tutorial project over at Spotify SDK for Android. This was a bit cumbersome, compared to just including a library JAR.

    If it is unlikely to happen again, I withdraw the request.

    I am using Netbeans only and it works very well also as Android IDE. When you say "is handled by Gradle projects", then do you mean "used by" ?

  2. Radim Kubacki

    I am not sure what you mean by '"is back to" JAR' so I will try to explain it differently.

    Ant based tooling for Android projects is now deprecated and you should really consider migration to Gradle based build. Android projects using Gradle as their build system can generate AAR files (artifacts) and can consume these files. Using these files with Ant based projects can be possible but I don't think it is worth it. There is a documentation at http://tools.android.com/tech-docs/new-build-system/user-guide

  3. Carl Henrik Janson reporter

    OK, fog lifting somewhat. Please note that I am competent on Ant only to the extent that this is necessary to build the Android or Java projects in the context of Netbeans. Beyond that, please excuse my ignorance.

    Beyond the AAR format that is an abandoned format in the Android SDK, what are the benefits of Gradle compared to Ant in my Android/Netbeans context? Will it be a timesaver, or just something I would do to be compliant with the majority? How do I tell NB to use Gradle? Is there a tutorial available for these types of questions? Anyway, thanks for explaining with a teaspoon.

  4. Radim Kubacki

    AAR format is not abandoned. You can check that this is the output produced when you build Android library project at http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-projects

    Watch some of the Xav's videos to find why they decided to switch to Gradle. Some ideas are also mentioned at the top of this linked guide. IMO if you plan to do more Android work you will need to get used to Gradle.

    Folders containing build.gradle or settings.gradle are recognized as projects if you have Gradle plugin installed (http://plugins.netbeans.org/plugin/44510/gradle-support). And it is installed as dependency of 'NBAndroid Extensions' plugin.

  5. Mark Kotlyar

    Well, in my LibGDX project, I have two AAR dependencies which were downloaded by Gradle. Facebook SDK and Android Support.

    It seems as if those two - the only two which are AAR - are not recognized by the import in the Android project itself. Gives me a package doesn't exist error.

  6. Log in to comment