UnsatisfiedLinkError when calling method from native library although System.loadLibrary seems ok

拥有回忆 提交于 2019-12-02 06:55:32

1) If you change package name for class that contains native methods, you should change method signature in native code.

2) Try create one more fodler with name armeabi-v7a and copy *.so there because some devices can't use old armeabi and ignore libs in that fodler

3) in module graddle script add this lines inside "android" block:

sourceSets.main {
    jni.srcDirs = []
    jniLibs.srcDir 'src/main/jniLibs'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!