Dalvik.system.PathClassLoader can't find native library on Intel devices

I’m having an issue where the dalvik.system.PathClassLoader can’t find my jni file on Intel devices. I think it has to do with the structure of an aar dependency I have because once I removed that dependency, the jni file is found without issue. My aar dependency has x86 and arm libraries and my project only 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 that structure, libLibraryA.so will not be found on x86 devices. I’m not sure if this is a gradle packaging issue or if this is a dalvik/runtime issue. I’m at a loss of where to go next. The error I get is:

FATAL EXCEPTION: main

Process: com.comcast.playerplatform.android, 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

at java.lang.Runtime.loadLibrary(Runtime.java:366)

at java.lang.System.loadLibrary(System.java:989)