java.lang.UnsatisfiedLinkError:dlopen失败:无法找到符号"__aeabi_memcpy8";由mylib.so引用 [英] java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy8" referenced by mylib.so
问题描述
当我的应用程序在Android 6.0或更低版本的设备(Nexus 5,Galaxy 3 ...)上运行时,它崩溃于System.loadLibrary("mylib");
When my app runs in Android 6.0 or below devices(Nexus 5, Galaxy 3...), it crashes at System.loadLibrary("mylib");
它可以在Android 7.0设备(Nexus 5x,Nexus 9)上正常运行. 我使用最新的Android Studio(2.2)和NDK.
It works fine with Android 7.0 devices(Nexus 5x, Nexus 9). I use latest Android Studio(2.2) and NDK.
记录猫的消息是
java.lang.UnsatisfiedLinkError:dlopen失败:无法找到mylib.so引用的符号"__aeabi_memcpy8".
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memcpy8" referenced by mylib.so.
以下是build.gradle的一部分.
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"
}
}
下面是Application.mk
Below is Application.mk
APP_ABI := armeabi armeabi-v7a x86
APP_PLATFORM := android-10 // Whatever this is, it crashes.
出什么问题了?
即使我注释掉.c文件中的所有memcpy,它也会发出相同的错误消息.在运行之前,我先清除并重建项目.
Even if I comment out all memcpy in .c files, it issues the same error message. Before I run, I clear and rebuild project.
推荐答案
确保平台ndk>平台下的Application.mk APP_PLATFORM = Android-x中具有正确的平台.
Make sure below your ndk>platforms hava the right paltform in your Application.mk APP_PLATFORM=Android-x.
这篇关于java.lang.UnsatisfiedLinkError:dlopen失败:无法找到符号"__aeabi_memcpy8";由mylib.so引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!