Android Studio does not detect .aidl files

来源:互联网 发布:传奇霸业翅膀升级数据 编辑:程序博客网 时间:2024/05/01 09:27


up vote15down votefavorite
5

I have found a sample from the Internet (https://github.com/manishkpr/Android-AIDL-Example) and ran on Android Studio and it worked fine.

But now when I am trying to recreate the project, the Android Studio fails to recognize the .aidl file no matter where I place it. Can anybody tell me what is the right location to place .aidl files in Android Studio?

p.s. I have added the below code to build.gradle and place the .aidl file in the java directory, but failed to get it work.

sourceSets {main {    aidl.srcDirs = ['src/main/java']}
shareimprove this question
 

4 Answers

activeoldestvotes
up vote11down voteaccepted

The below link solved my issue.

https://code.google.com/p/android/issues/detail?id=56160

// 在src/main目录下建立aidl目录,然后在里面建立package(包名应该为aidl原文件中的package指定的目录)

0 0