Android Library Project -> JAR

http://developer.android.com/tools/projects/index.html#LibraryProjects

Specifically

Note: You need SDK Tools r14 or newer to use the new library project feature that generates each library project into its own JAR file. You can download the tools and platforms using the Android SDK Manager, as described in Exploring the SDK.


Can we take advantage of this in IntelliJ IDEA?  I want to create a redistributable Android Library and am coming up empty handed in my searches.

Thanks in advance,

Steve

4 comments
Comment actions Permalink

Let me also add that I do not need to include any resources.  I just need access to the Android API.

0
Comment actions Permalink

Hello,

Yes, it is supported in IDEA 13.0.2, if you use Gradle build system. So, you should create Gradle-based Android project, not the usual one. The library module will be packaged into AAR file which will contains JAR inside it. However, if you're not going to include any resources to the library, probably you don't need AAR, so you may create simple JAR library just by creating simple Java (not Android) project in IntelliJ, specify Android SDK as the project SDK (you'll be able to use Android API in your code after it), and create JAR artifact.

0
Comment actions Permalink

Thank you for the info!

0
Comment actions Permalink

How do I do this with a maven project using the android-maven-plugin? IntelliJ does not appear to understand aars!

0

Please sign in to leave a comment.