ITelephony.aidl 未在 Eclipse 中编译
我正在使用 这个答案的代码,因为我必须添加 ITelephony.aidl 到我的项目源,我就是这样做的。
但是这个aidl文件无法编译。还需要其他步骤吗?
I am using the code of this answer, where as I have to add ITelephony.aidl to my project source, I did that.
But this aidl file not compiling. Is there any other step which are required?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
首先在项目的 src 文件夹中创建一个名为 com.android.internal.telephony 的包,并在该包中创建一个文件并复制粘贴 ITelephony 接口,并将该文件另存为 ITelephony.aidl。编译时,您将在 gen 文件夹中获得 ITelephony 的 .java 文件。这就是我所做的,我的问题得到了解决。
希望这有帮助
First create a package in the src folder in your project named com.android.internal.telephony and within that package create a file and copy paste the interface ITelephony and save the file as ITelephony.aidl. When you compile you will get the .java file for the ITelephony in the gen folder.This is what I did and my issue got solved.
Hope this helps
如果你的aidl文件在eclipse中显示任何错误,那么你应该考虑它并在此处发布错误,但如果它没有显示任何错误,你必须清理你的项目并再次构建它。在此过程之后,您必须进入“gen”文件夹并检查该文件是否已在那里编译,以及是否存在与aidl 文件同名的任何类。如果找到,则说明aidl文件编译正确。
谢谢和问候,
阿里
If your aidl file is showing any error in eclipse then you should consider it and post the error here but if it is not showing any error you must clean your project and build it again. After this process you must go in "gen" folder and check either this file is compiled there and any class is exist with the same name of aidl file. If it is found, its mean aidl file is compiling properly.
Thanks and Regards,
Ali
某些版本的 Eclipse 会移动项目的参考库文件夹。更新 eclipse、重新安装 eclipse 和 adt 插件或移动 eclipse 文件夹中的库。
Certin versions of Eclipse move the reference library folders for prjects.Either update eclipse, reinstall eclipse and the adt plug in or move the library within your eclipse folder.