一、aidl需要客户端与服务端的一致(包名一致),关联ADIL的文件也一致
二、aidl需要在build-grade下添加
sourceSets{ main{ java.srcDirs = ['src/main/java','src/main/aidl'] } }
才能在app-build-generated-source-aidl-debug下找到对应的aidl生成的java文件
三、aidl在从服务端复制到客户端时
需要在以下手动添加与服务端一致的再复制服务端aidl下的文件
否知会出现以下错误:
Error:Execution failed for task ':app:compileDebugAidl'. > java.lang.RuntimeException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\SDK\build-tools\24.0.2\aidl.exe'' finished with non-zero exit value 1