Compiling so libraries
1, the new project, the establishment of the JNI directory for the placement of C language-related documents
2. Writing android.mk files
1 Local_path: = $ (call My-dir) 2 include $ (clear_vars) 3 local_ldlibs: =-llog 4 local_module : = Psamlib 5 6 7 8 9 include $ (build_shared_library)
3. Configure the Builders option
4, finished the above action can compile so library.
Using so library files
1, the new project, the establishment of the JNI folder for the C language related files, the above works in the. h file and compiled to get so file also into it.
2. Writing android.mk files
1 Local_path: = $ (call My-dir)2 include $ (clear_vars)3 local_ldlibs: =-llog4 local_module: = Psamdev5 local_src_files: = com_example_psam_api_psamdev.c6 7 local_shared_libraries + = Libpsamlib8 9 Ten include $ (build_shared_library) One A - - include $ (clear_vars) the local_module: = Libpsamlib - local_src_files: = libpsamlib.so - -Include $ (prebuilt_shared_library)
3. Configure the Builders option
4. After completing the above action, you can use the function in so in the project.
Android Project compile and use C language dynamic library (so library)