我正在尝试使用AIDL在Android上创建远程IPC服务。我找到了一些文档,讲解如何在Eclipse中创建此类服务,但没有一个解释在InteliJ IDEA上创建过程的文档。
我注意到IntelliJ中有这个功能,位于File>New>Android Component>Remote Interface,我使用它来创建了一个名为IRemoteService.aidl的文件,并具有以下内容:
package MyApp.Android.RemoteServices;
/**
* Created with IntelliJ IDEA.
* Máxima Sistemas de Informática S.A.
* User: regis.oliveira
* Date: 27/03/13
* Time: 23:26
* To change this template use File | Settings | File Templates.
*/
/** Example service interface */
interface IRemoteService {
/** Request the process ID of this service, to do evil things with it. */
int getPid();
/** Demonstrates some basic types that you can use as parameters
* and return values in AIDL.
*/
void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,
double aDouble, String aString);
}
但是,当我尝试编译该项目时,出现以下错误:
android-idl-compiler: D:\Docs\Programming\MyApp.Android.RemoteServices\IRemoteService.aidl:10 interface IRemoteService should be declared in a file called MyApp\Android\RemoteServices\IRemoteService.aidl.
有没有在IntelliJ中已经实现过这个功能的人?是否有任何文档显示如何在其中使用此功能?
谢谢