繁体   English   中英

Android Intellij IDEA 12 AIDL

[英]Android Intellij IDEA 12 AIDL

我正在尝试使用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中实现了这个? 是否有任何文件显示如何使用此功能?

谢谢

经过一些尝试,我意识到问题是由Eclipse引起的,它与IntelliJ同时打开。 因此,在关闭Eclipse并重新启动IntelliJ之后,一切都按预期工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM