# dlib-so_for_android **Repository Path**: james9/dlib-so_for_android ## Basic Information - **Project Name**: dlib-so_for_android - **Description**: 封装dlib api ,以便在android平台环境上使用。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-04-04 - **Last Updated**: 2024-07-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 1. Prerequisites,Download opencv-android 3.1.4 ``` copy to /yourpath/dlib_for_android/third_party/ ``` ### 2. Prerequisites,Download Android-NDK r21e . Export ANDROID_NDK_HOME in ~/.bashrc ``` `$ vim ~/.bashrc` `export ANDROID_NDK_HOME=[NDK_PATH]/android-ndk-[version]` `export PATH=$PATH:$ANDROID_NDK_HOME` ``` ### 3. Install Android Debug Bride (ADB). ``` sudo apt-get install android-tools-adb ``` ### 4. Prepare an Android device for test ### 5. Build JNI code and shared library for Android application ``` sh $ cd [dlib_for_android] $ python build_p38.py ``` ### 6. Alternative way to build native code and copy to the Android Studio's project manually: ```sh $ cd [d] $ ndk-build -j 2 ``` ### 7. Folder structure ``` ├── dlib # Source files of dlib. It is a submodule ├── jni # Source files of JNI codes and their make files ├── tools # Tools and utilities ├── third_party # Like OpenCV and miniglog ├── CMakeLists.txt # Use CMake to build instead of using Android.mk ```