Question

I came across a comment this answer which states that a library project:

  1. cannot hold .aidl files,
  2. cannot depend on another library project,
  3. cannot hold assets

Well, that comment was made about a year and a half ago, and I can tell you with utmost certainty that item #2 is no longer true (September 2010?), because I have a perfectly working project, made of a library project that depends on another library project.

So, my questions are two:

  1. Is it still true that a library project cannot hold .aidl files?
  2. If the answer to #1 is yes, then what is the reason for this?

BTW, as an experiment, I tried to place IMarketBillingService.aidl (from the In-app Billing sample) in a library project (without anything that uses it yet), and the project builds and runs as before. So, if it's still isn't possible for a library project to contain a .aidl, this must be something deeper...

Was it helpful?

Solution

The answer is 'No'. You can use an AIDL file in library projects just fine. I use such a setup in three different projects. Don't remember exactly when, but they fixed this a while ago (probably when they added the library-library support to ADT). The reason it didn't work before is that the ADT builder didn't recognize the AIDL file and didn't generate the necessary Java stubs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top