Cutils not included in NDK?

爷,独闯天下 提交于 2019-12-12 08:45:27

问题


I need to use cutils library and headers to implement ashmem on my NDK project but I could not find anything related to cutils in my system. Where is it located or from where can I obtain it?


回答1:


The Android "cutils" library, found in the sources at system/core/libcutils, is not part of the NDK. The code there changes with every release, so it's not something you can rely on.

The best approach for now is to copy the source for the relevant portions of the library into your project.




回答2:


If you don't mind about compatibility, you can get the libcutils.so from your connected device or emulator.

adb pull /system/lib/libcutils.so

This is good for development or for private use; for release just copy the source of the things you need into your own project.



来源:https://stackoverflow.com/questions/17744108/cutils-not-included-in-ndk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!