java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “__aeabi_memcpy8” referenced by mylib.so

ぐ巨炮叔叔 提交于 2019-12-25 14:49:06

问题


When my app runs in Android 6.0 or below devices(Nexus 5, Galaxy 3...), it crashes at System.loadLibrary("mylib");

It works fine with Android 7.0 devices(Nexus 5x, Nexus 9). I use latest Android Studio(2.2) and NDK.

Log cat message is

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy8" referenced by mylib.so.

Below is part of build.gradle.

compileSdkVersion 24
buildToolsVersion '24.0.2'
defaultConfig {
    applicationId "myApp"
    minSdkVersion 10
    targetSdkVersion 24 // Whatever this is, it crashes(22, 19...).
    ndk {
        moduleName "mylib"
    }
}

Below is Application.mk

APP_ABI := armeabi armeabi-v7a x86
APP_PLATFORM := android-10 // Whatever this is, it crashes.

What is the problem?

Even if I comment out all memcpy in .c files, it issues the same error message. Before I run, I clear and rebuild project.


回答1:


Make sure below your ndk>platforms hava the right paltform in your Application.mk APP_PLATFORM=Android-x.



来源:https://stackoverflow.com/questions/39970974/java-lang-unsatisfiedlinkerror-dlopen-failed-cannot-locate-symbol-aeabi-mem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!