-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Error building AIDL files as part of build #271
Comments
I have some more insights. Out of the four AIDL files, it seems 3 only contain parcelable objects (as the error describes), which leaves us with only one AIDL file to be handled - ControlService.aidl . I made the minimal changes to the proj_gen_aidls = []
for aidlfile in glob(['src/main/java/**/ControlService.aidl']):
name = 'proj_aidls__' + re.sub(r'^.*/([^/]+)\.aidl$', r'\1', aidlfile)
proj_gen_aidls.append(':' + name)
gen_aidl(
name = name,
aidl = aidlfile,
import_path = 'src',
) Now I am getting the following errors:
It looks as though the $ ls -a .buckconfig
.buckconfig
$ find . | egrep 'BackendServiceState.java|TripState.java|VehicleState.java'
./src/main/java/com/mobile/proj/domain/BackendServiceState.java
./src/main/java/com/mobile/proj/domain/TripState.java
./src/main/java/com/mobile/proj/domain/VehicleState.java So why isn't the |
This might be silly, but what if you set |
This is the bit that makes me think that |
No response from @amitkot. If we get one, we can reopen this. |
@sdwilsh Hi, I think the problem is that in @amitkot 's And I also tried change |
@sdwilsh And I find that inside BUCK source code, when executing the |
@sdwilsh I create a reproduce project that could reproduce the AIDL support problem. Inside the project root dir, execute /Users/piasy/src/BuckAidlDemo/app/src/main/aidl/com/github/piasy/buckaidldemo/Person.aidl:3 aidl can only generate code for interfaces, not parcelables or flattenables,
/Users/piasy/src/BuckAidlDemo/app/src/main/aidl/com/github/piasy/buckaidldemo/Person.aidl:3 .aidl files that only declare parcelables or flattenablesmay not go in the Makefile. When I use my self built BUCK with the modification of removing the /com/github/piasy/buckaidldemo/IMyAidlInterface.java:152: error: can't find symbol
public void sayHello(com.github.piasy.buckaidldemo.Person person) throws android.os.RemoteException;
^ Obviously the |
@marcinkosiba might have so ideas on how to fix it then to help you submit a PR :) |
I hope this bug could fix it soon. |
I cannot build,always receive same problem. |
a simple workaround:
project_config( gen_aidl( gen_aidl( project_config( |
Sounds cool, I'll try it. |
@loveguag I have a better solution based on yours, see my demo project for full example: 0 . modify AidlStep.java, comment off line 69:args.add("-b") then build buck; 1 . Put all self implemented parcelable class inside a directory under 2 . Add this rule into android_library(
name = 'parcelables',
srcs = glob([
'src/main/parcelable/**/*.java',
]),
) 3 . Change the android_library(
name = 'app_aidls',
srcs = gen_app_aidls,
deps = [':parcelables'], // add dependency to :parcelables
) 4 . (To enable gradle works well at the same time) Add this line into android {
...
sourceSets {
main.java.srcDirs += 'src/main/parcelable'
}
} 5 . Enjoy! Besides, I submitted a pr #708, hope @sdwilsh can process it soon. After BUCK could compile aidl correctly, I'll update OkBuck to get fully aidl support too. |
Wonderful~ |
I have a couple of AIDL files in a directory that contains both them and Java files.
Following the AntennaPod tutorial, I created the following BUCK file for my project:
When I run
buck build proj
I get the following errors:Any ideas?
The text was updated successfully, but these errors were encountered: