Android ndk androidndk及其库

Android ndk androidndk及其库,android-ndk,Android Ndk,在Android NDK中,如果希望包含 #include <android/log.h> log=log.h 所以,如果我想包括Android SDK #include <android/bitmap.h> 这是一个问题。另一个是,如果需要更多的包含,那么我会像上面那样逐个列出log.h和bitmap.h?不,头文件和库之间没有1:1的对应关系,尽管在少数情况下它们恰好重合 使用grep似乎表明中的函数在libjnigraphics.so中,这意味

在Android NDK中,如果希望包含

   #include <android/log.h>
log=log.h

所以,如果我想包括Android SDK

      #include <android/bitmap.h>

这是一个问题。另一个是,如果需要更多的包含,那么我会像上面那样逐个列出log.h和bitmap.h?

不,头文件和库之间没有1:1的对应关系,尽管在少数情况下它们恰好重合

使用grep似乎表明
中的函数在libjnigraphics.so中,这意味着

-ljnigraphics
要获得完整的正式参考,请查看NDK安装的docs/目录中的文件“STABLE-api.HTML”,您可以在其中找到以下内容:

The 'jnigraphics' Library:
--------------------------

This is a tiny library that exposes a stable, C-based, interface that allows
native code to reliably access the pixel buffers of Java bitmap objects.

To use it, include the <android/bitmap.h> header in your source code, and
and link to the jnigraphics library as in:

  LOCAL_LDLIBS += -ljnigraphics
jnigraphics库:
--------------------------
这是一个很小的库,它公开了一个稳定的、基于C的接口,允许
可靠访问Java位图对象像素缓冲区的本机代码。
要使用它,请在源代码中包含标题,然后
并链接到jnigraphics库,如中所示:
局部_LDLIBS+=-ljnigraphics

所以有些lib来自标准Android SDK,有些来自NDK,对吗?不,没有一个来自SDK。在开发机器上使用任何导入库的唯一官方方式是安装NDK。NDK的某些部分提供了对SDK功能的本机模拟(或包装),但它们是NDK的一部分,而不是SDK的一部分。
-ljnigraphics
The 'jnigraphics' Library:
--------------------------

This is a tiny library that exposes a stable, C-based, interface that allows
native code to reliably access the pixel buffers of Java bitmap objects.

To use it, include the <android/bitmap.h> header in your source code, and
and link to the jnigraphics library as in:

  LOCAL_LDLIBS += -ljnigraphics