如何在Android Studio中引用外部帮助文件

问题描述:

我有两个使用.aidl文件进行通信的项目. 使用eclipse,我可以简单地引用源文件夹,并且所有工作都按预期进行. 如何在"Android Studio"中执行此操作??这看似简单的任务,但对于我的一生,我还没有发现如何实现?
任何帮助将不胜感激.

I have two projects that communicate using a .aidl file. Using eclipse I could simply reference the source folder and all worked as expected. How can I do that in 'Android Studio'?? It seems a simple task, but for the life of me, I haven't discovered how?
Any help would be greatly appreciated.

注意:aidl文件不是任何一个项目的一部分,两者都引用了它.

Note: the aidl file is not part of either project, it is referenced by both.

As pointed out in How to add link to file system in IntelliJ IDEA? there is no way to link to an external file in the way that eclipse allows.

我所做的是将.aidl源添加到每个项目中.我不喜欢这样做,因为它迫使人们保持同步.

What I did was to add the .aidl source to each project. I don't like doing this as it forces one to keep them in sync.

现在考虑将一个依赖添加到另一个.

Now considering adding a dependency from one to the other.