UnsatisfiedLinkError: dlopen failed: Cannot find the character "__aeabi_memcpy4" referenced

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)

#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
+4
source share
1 answer

, , JNI Gradle Android Studio Android NDK: java.lang.UnsatisfiedLinkError: dlopen failed: "" "libffmpeg.so"

:

1) Application.mk :

APP_CFLAGS += -I$(LOCAL_PATH)  
APP_ABI := all  
APP_PLATFORM := android-19 

2) build.gradle, Application.mk, , -, Gradle Android.mk api, compileSdkVersion not minSdkVersion.

com.android.tools.build:gradle:2.2.0 ( . JNI SO):

externalNativeBuild {
    ndkBuild {
        path 'src/main/jni/Application.mk'
    }
}

, , , , ,

+1

Source: https://habr.com/ru/post/1660088/


All Articles