错误:
03-18 15:24:46.441: E/art(1762): dlopen("/data/app/com.nvidia.NativeCamera-1/lib/arm/libnative_camera2.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZN7android11BufferQueueC1ERKNS_2spINS_19IGraphicBufferAllocEEE" referenced by "libnative_camera2.so"...
Application.mk
NDK_TOOLCHAIN_VERSION=4.8
APP_ABI := armeabi-v7a
APP_STL := gnustl_static
APP_PLATFORM := android-19
APP_CFLAGS = -gdwarf-2 -DANDROID -DUSE_REGAL
Android.mk
LOCAL_PATH := $(NV_MODULE_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE := NativeCamera
LOCAL_CFLAGS += -std=c++11
LOCAL_SRC_FILES := NativeCamera.cpp ImageSave.cpp
LOCAL_STATIC_LIBRARIES += nvappbase nvui nvassetloader nvglutils nveglutil nvgamepad external_regal
LOCAL_LDLIBS := -lEGL -landroid
LOCAL_SHARED_LIBRARIES += native_camera2
include $(BUILD_SHARED_LIBRARY)
$(call import-add-path, $(LOCAL_PATH)/external)
$(call import-add-path, $(LOCAL_PATH)/../../)
$(call import-module,nvapp)
$(call import-module,native_camera2);
注意:我已尝试更改为gnustl_shared
。它不起作用。我正在尝试开发本机Android相机应用程序,但我有运行时错误。 $(NV_MODULE_PATH)
指的是包含外部\ nvapp的jni文件夹。我有native_camera2之前的2个文件夹。所以没有位置错误也没有编译错误。只是在运行时链接错误libnative_camera2.so。这个native_camera2是nvidia的预建库,我正在尝试使用它。