Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Java by (10.2k points)

I know of Android Library projects, which allow you to create a shared-source project that can be pulled into Android Applications as needed. However, that requires that source be available.

I'm looking for a way to build and distribute a closed-source library that can be used in other Android projects like a traditional JAR. This will require usage of the Android compiler, so it's not a vanilla-Java JAR file. FWIW, I do not need to embed resources/layouts in the JAR.

I've seen http://andparcel.com/ but it feels like a workaround, and I would rather use something 'officially supported' by Google. Also, I need to make sure that the JAR I build is compatible with old/new version of the Android SDK (i.e. I need a way to set the target platform version, etc).

Do the latest Android toolsets allow for the creation/consumption of JAR binaries? Can you point to some documentation on how I can do it?

1 Answer

0 votes
by (4k points)

If you create a Android Library project without having any resources, the ADT (first noticed in r16) will create a .jar with the same name as the project in the 'bin' folder.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...