getting error "has bad ELF magic" while load .so library

476 views Asked by At

I have a project that requires using a library with a .a file, after that I converted it to a .so file, after running I found the error "has bad ELF magic"

what solution should I use to solve the problem

error snippet :

"Process: com.xxx.xxx.beta, PID: 25906
    java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.xxx.xxx.beta-xxxxxxxxxxxxxxxxxxxxxxxx==/lib/x86/mylib.so" has bad ELF magic"

I already added

`sourceSets.main {
        jniLibs.srcDir 'src/main/jniLibs'
        jni.srcDirs = []
    }`

and

ndk {
            abiFilters 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
        }
0

There are 0 answers