I just upgraded from NDK 12.x to 13.x and now I get the following crash:
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy4" referenced by "/data/app/com.app.myapp-1/lib/arm/libJniBitmapOperationsLibrary.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.jni.bitmap_operations.JniBitmapHolder.<clinit>(JniBitmapHolder.java:11)
<...>
The library I use is available here .
I saw several similar problems on SO to do with cannot locate symbol, and all suggestions related to installation APP_PLATFORMin a file Application.mk. My JNI library is part of the SDK, so I don't have a file Application.mk- only Android.mk. Also my target / min sdk has not changed recently. My file is Android.mkcopied from the library and looks like this:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := JniBitmapOperationsLibrary
LOCAL_SRC_FILES := JniBitmapOperationsLibrary.cpp
LOCAL_LDLIBS := -llog
LOCAL_LDFLAGS += -ljnigraphics
include $(BUILD_SHARED_LIBRARY)
APP_OPTIM := debug
LOCAL_CFLAGS := -g
source
share