【发布时间】:2023-01-25 08:27:23
【问题描述】:
我在/devices下有一个原生模块:
- module
-- aidl
--- com
---- my
----- package
------ IMyInterface.aidl
-- Android.mk
-- Proxy.h
-- Proxy.cpp
我想在这个模块中使用活页夹。我的Android.mk:
LOCAL_PATH := $(call my-dir)
$(call emugl-begin-shared-library,libMyModule)
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl
LOCAL_SRC_FILES := \
aidl/com/my/package/IMyInterface.aidl \
Proxy.cpp \
LOCAL_HEADER_LIBRARIES := libbinder_headers \
libhidlbase_impl_internal \
libbase
LOCAL_SHARED_LIBRARIES := \
libbinder \
libutils \
liblog \
libcutils
$(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
$(call emugl-import,libOpenglCodecCommon$(GOLDFISH_OPENGL_LIB_SUFFIX))
$(call emugl-end-module)
当我构建它时,它会生成 C++ 标头,但它们仅位于 intermediates 目录中:
$ ls out/target/product/emulator_x86_64/obj/SHARED_LIBRARIES/libMyModule_intermediates/aidl-generated/include/com/my/package:
BnMyInterface.h BpMyInterface.h IMyInterface.h
我应该如何将它们包含在我的Proxy.cpp 中?如果我只是添加#include "IMyInterface.h",构建系统看不到它:fatal error: 'IMyInterface.h' file not found
【问题讨论】:
标签: android c++ android-source aidl android-soong