Android JNI基础篇

Posted on 2018-08-03 15:05  yacbo  阅读(86)  评论(0编辑  收藏  举报

https://blog.csdn.net/quwei3930921/article/details/78820991

①JNI是什么?Java Native Interface,它是java和C/C++相互通信的接口。

②JNI需要引入jni.h头文件

③加载so库 System.loadLibrary(libname);

④android studio通过CMakeLists.txt文件配置需要生成的so库,通过cmake命令来生成so库;

⑤CMakeLists.txt配置详情

add_library;find_library;target_link_libraries

 

Copyright © 2024 yacbo
Powered by .NET 9.0 on Kubernetes