0

I have one aidl interface and this one is implemented by A app and B app wants to use that aidl. In A app Android.mk

LOCAL_SRC_FILES += src/com/a/simple/ISimpleInterface.aidl

LOCAL_AIDL_INCLUDES += src/com/a/simple/ISimpleInterface.aidl

In B App i have just imported aidl interface as below

import com.a.ISimpleInterface;

But while module building for B app gives Error like "the com.a cannot be resolved".

Manukumar
  • 381
  • 1
  • 4
  • 11

1 Answers1

0

LOCAL_AIDL_INCLUDES is a directory, not a file. Also, it does not inherit the $(LOCAL_PATH). So, you probably need to set

LOCAL_AIDL_INCLUDES += $(A_APP_PATH)/src
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • Added what you suggested but still other application is not able to use the aidl.. – Manukumar Dec 20 '18 at 14:06
  • The 'other' application must see the aidl files, not the origin. I have fixed the answer to make it more clear. – Alex Cohn Dec 20 '18 at 14:47
  • Do you have any documentation link for variable `LOCAL_AIDL_INCLUDES`? From [this answer](https://stackoverflow.com/a/27408433/3066295), I found it may be from https://android.googlesource.com/platform/build/+/master/core/base_rules.mk – TT-- May 02 '19 at 17:11
  • Since [August 2015](https://android.googlesource.com/platform/build/+/956dcccf76bb176b45cc098808cb7ac5dcb5e8f7), this code has been moved from **base_rules.mk** to **java.mk**. The current [**master**](https://android.googlesource.com/platform/build/+/ff14c47182a7636477432dee294dd14e9f4b1935/core/java.mk) still uses `LOCAL_AIDL_INCLUDES`. This source shows how `LOCAL_AIDL_INCLUDES` is used by Google to build the Android platform. It is often a reasonable clue to the way they expect you to use it in your project, but it is by no means a bounding contract. – Alex Cohn May 03 '19 at 15:59