Mayank
Mayank

Reputation: 1139

Android Library Project JAR

I was going through the following link and there are two statements mentioned over there.

1. You need SDK Tools r14 or newer to use the new library project feature that generates each library project into its own JAR file

2. You cannot export a library project to a JAR file A library cannot be distributed as a binary file (such as a JAR file). This will be added in a future version of the SDK Tools.

I have got confused after reading these two statements. Aren't these two statements talking about same thing and is conflicting each other?

If no, please help me understand what is the difference between the two.

Upvotes: 3

Views: 1699

Answers (1)

HexAndBugs
HexAndBugs

Reputation: 5799

There is a subtle distinction: the JAR file created contains only the compiled class files, and does not include any resources (from the res folder). I think the second statement is referring to the fact that currently, the library project cannot be distributed as just a JAR file because any resources belonging to the library project will not be included in the JAR file. However, it sounds like it is planned that in future it should be possible to package an entire library project, including resources, as a JAR file.

UPDATE: see also this answer

Upvotes: 3

Related Questions