I've just updated from NDK 12.x to 13.x and now I'm getting 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'm using is available here.
I've seen a few similar issues on SO to do with cannot locate symbol
and all the suggestions were around setting APP_PLATFORM
in the Application.mk
file. My JNI library is part of the SDK so I don't have Application.mk
file - only Android.mk
. Also my target/min sdk didn't change recently. My Android.mk
file is copied from the library and looks like this:
LOCAL_PATH := $(call my-dir) #bitmap operations module 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