开发者

Android filesystem includes

I am developing a native Android app, and I need access to GraphicBuffer.h (which is located in frameworks/base/include)

So I added the following to my Android.mk

#Android includes
LOCAL_C_INCLUDES += \
            $(MYDROID)/frameworks/base  \
            $(MYDROID)/frameworks/base/include

The problem is that GraphicBuffer.h includes a bunch of other header files, and I don't want to have to add the paths to all of them in my makefile. What is the correct way to do this?

Update: While I would LOVE to know the correct way of doing this for the future, in this case, all that was needed was

#Android includes
LOCAL_C_INCLUDES += \
            $(MYDROID)/frameworks/base/include  \
            $(MYDROID)/hardware/libhardware/include \
            $(MYDROID)/system/core/inclu开发者_Python百科de


You're supposed to use NDK to build native application.

What you're doing is trying to include header from Android source. This is not guaranteed to work on all devices, since this is not public API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜