How to bundle third party libs in apk?

This question has been asked quite a few times, but I can’t seem to find any concrete answers. I have some shared libraries that I need to add to my apk, but for the life of me can’t figure out how. As a result, whenever I try to run my app, I get the following kinds of errors:

java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found

Obviously it can’t find it, because it’s not inside the .apk. If I try to add them through the gradle file using main.jniLibs.srcDirs I get a duplicate resource errors. Anyone have any ideas?

Right, I just had to bung the libraries into a folder called jniLibs within my src/main folder: