Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't a .aidl be placed into a library project?

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...

like image 883
Bill The Ape Avatar asked Jan 13 '12 02:01

Bill The Ape


1 Answers

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.

like image 75
Nikolay Elenkov Avatar answered Oct 01 '22 16:10

Nikolay Elenkov