android - dalvik.system.PathClassLoader can't find jni on Intel devices -


i'm having issue dalvik.system.pathclassloader can't find jni file on intel devices. think has structure of aar dependency have because once removed dependency, jni file found without issue. aar dependency has x86 , arm libraries , project has arm libraries.

the folder structure is:

my project

  • src
    • jnilibs
      • armeabi
        • liblibrarya.so

my aar dependency project has:

  • src
    • jnilibs
      • armeabi
        • liblibraryb.so
      • x86
        • liblibraryb.so

with structure, liblibrarya.so not found on x86 devices. i'm not sure if gradle packaging issue or if dalvik/runtime issue. i'm @ loss of go next. error is:

  fatal exception: main    process: com.project, pid: 10850   java.lang.unsatisfiedlinkerror: dalvik.system.pathclassloader[dexpathlist[[zip file "/base.apk"],nativelibrarydirectories=[/lib/x86, /vendor/lib, /system/lib]]] couldn't find "liblibrarya.so"   @ java.lang.runtime.loadlibrary(runtime.java:366)   @ java.lang.system.loadlibrary(system.java:989)` 

i know issue can 'fixed' creating x86 folder in project , copying liblibrarya.so it. know if gradle can/should handling me? safe put arm compiled library x86 folder use on intel devices or mess runtime translation? i've seen issues on nexus player can't read our arm compiled library.

you can mix libs compiled x86 , arm if don't depend on each other (ie. if don't call each other directly without going through java).

so gradle not mix libs targeting different architectures, it's responsibility , simple way indeed copy liblibrarya.so x86 folder.

but doing workaround work on retail intel-based devices. don't recommend that: right thing still getting version of liblibrarya.so compiled x86 , putting inside x86 folder.

update: said in comment below, loading arm lib app's x86 folder isn't supported anymore android 5.0.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -