Unsatisfied communication error - could not find the library

I am trying to load the libjnigraphics.so library into my project, however when I deploy the application I get this error:

06-17 22:35:28.741: INFO/dalvikvm(298): Unable to dlopen(/data/data/com.foo/lib/libndkfoo.so): Cannot load library: link_image[1721]:    29 could not load needed library 'libjnigraphics.so' for 'libndkfoo.so' (load_library[1051]: Library 'libjnigraphics.so' not found)

error

It compiles fine, great.

Here is also my Android.mk:

LOCAL_PATH := $(call my-dir)

# Add prebuilt libjnigraphics
include $(CLEAR_VARS)

LOCAL_MODULE := libjnigraphics
LOCAL_SRC_FILES := libjnigraphics.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include

include $(PREBUILT_SHARED_LIBRARY)


include $(CLEAR_VARS)

# Here we give our module name and source file(s)
LOCAL_MODULE    := ndkfoo
LOCAL_SRC_FILES := ndkfoo.c
LOCAL_SHARED_LIBRARY := libjnigraphics
#LOCAL_LDLIBS += -libjnigraphics
LOCAL_LDLIBS += -llog

include $(BUILD_SHARED_LIBRARY)

Is there any special place to host libjnigraphics.so? Right now I have this in the jni folder, but I tried it in several other places and it still does not work. Any help?

+3
source share
2 answers

The device must run Foyo (Android 2.2, target platform android-8) in order to use libjnigraphics.so. No matter what is in your SDK or project directories, this library is part of the device’s system libraries.

NDK android-8, , apk, 2.1 .

SO , . android-ndk, .

+2

:

LOCAL_PATH := $(call my-dir)

# libjnigraphics

$(CLEAR_VARS)

LOCAL_MODULE: =

LOCAL_SRC_FILES: = libjnigraphics.so

LOCAL_EXPORT_C_INCLUDES: = $(LOCAL_PATH)/include

$(PREBUILT_SHARED_LIBRARY)

$(CLEAR_VARS)

# Here we give our module name and source file(s)

LOCAL_MODULE: = ndkfoo

LOCAL_SRC_FILES: = ndkfoo.c

LOCAL_SHARED_LIBRARY: =

LOCAL_LDLIBS + = -llog

$(BUILD_SHARED_LIBRARY)

0

All Articles