机器人工作室找不到一个AIDL接口类使用 [英] android-studio can't find an aidl interface for use in class
问题描述
我在AIDL定义一个接口,但我不能延长,或发现任何方式。在IDE只是告诉我:无法解析符号KeyEventListener 任何想法如何解决这一问题?
I have an interface defined in the aidl but I can't extend it or find it any way. The ide just tells me: Can not resolve symbol 'KeyEventListener' Any idea how to fix this?
其他的相关信息:
- KeyEventListener是KeyEventListener.aidl定义的接口 的名称
- KeyEventListenerImpl是一个扩展接口存根类
- KeyEventListener只包含一个名为方法'无效doIt方法();'并同时格式化;
我知道Android的工作室是有些东西像$ P $ P-阿尔法却非常喜欢,他很高兴,如果有人能HALP我就这个!
I know android-studio is some thing like a pre-alfa but like it very much and would be very happy if some one could halp me out on this!
推荐答案
您可能最好关闭有一个看的的摇篮Plugin用户指南为Android。
You are probably best off having a look at The Gradle Plugin User Guide for Android.
摇篮,在默认情况下,需要一个特定的目录结构。如果你想使用摇篮与大多数Android开发者都习惯于目录结构,你需要把下面的(从上面提到的链接)的Android的块中。
Gradle, by default, requires a particular directory structure. If you want to use Gradle with a directory structure that most Android devs are accustomed to, you'll need to put the following (from the above-mentioned link) inside the "android" block.
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
在你做这个,做一个干净的重建是在安全方面。
After you've done this, do a clean and rebuild to be on the safe side.
就个人而言,我只是适应我的项目,以适应新的约定。
Personally, I just adapt my projects to fit the new convention.
这篇关于机器人工作室找不到一个AIDL接口类使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!