【问题标题】:Android Intellij IDEA 12 AIDLAndroid Intellij IDEA 12 AIDL
【发布时间】:2013-04-01 19:22:33
【问题描述】:

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

谢谢

【问题讨论】:

  • 我这样做。工作正常。请分享一个示例项目以重现该问题。
  • 嗨@CrazyCoder。经过一番尝试,我意识到问题是由与 IntelliJ 同时打开的 Eclipse 引起的。因此,在关闭 Eclipse 并重新启动 IntelliJ 后,一切都按预期工作。

标签: android intellij-idea aidl


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2013-05-05
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 2013-01-06
    • 1970-01-01
    • 2013-02-02
    相关资源
    最近更新 更多