Prevent manually added libraries from being deleted by ndk-build

后端 未结 1 1526
我在风中等你
我在风中等你 2021-02-12 11:51

I have a project which is reusing a native library (libocr.so) pre-compiled and for which I don\'t have source files. I manually put the library on libs/armeabi of my project an

1条回答
  •  隐瞒了意图╮
    2021-02-12 12:09

    ...ok I found the answer by myself... according to ndk/docs/PREBUILTS.HTML I changed my Android.mk like this:

    LOCAL_PATH := $(call my-dir)
    
    include $(CLEAR_VARS)
    
    LOCAL_LDLIBS := -llog
    
    LOCAL_MODULE    := libyuv
    LOCAL_SRC_FILES := ycrcbutils.c
    
    include $(BUILD_SHARED_LIBRARY)
    
    
    # Add prebuilt libocr
    include $(CLEAR_VARS)
    
    LOCAL_MODULE := libocr
    LOCAL_SRC_FILES := libocr.so
    
    include $(PREBUILT_SHARED_LIBRARY)
    

    and placed a copy of my libocr.so under jni folder of my project.

    0 讨论(0)
提交回复
热议问题