Android - need libwhatever.so in final project?

Hello,

I’m integrating some 3rd party stuff into the Android build of my Unity project using Unity 5.5.
We are using Gradle build, fyi.

The 3rd party stuff comes with a .jar file, and some platform-specific folders (arm64-v8a, armeabi, armeabi-v7a, x86, x86_64), with each platform specific folder having a single libwhatever.so file.

How do I get those libraries included in the final build project?

When I add the jar file to the PROJECTHOME/Assets/Android folder, it gets picked up automatically.
I’ve tried adding the libwhatever.so file to that folder, and have also tried adding all of the platform folders there. Unity sees each platform folder and has created .meta files for each, as well as for the contained lib file.

When I go look into the gradleOut folder, none of the platform folders nor the libwhatever.so files are included in the final output. Additionally, the classes in the .jar file notice the lib isn’t there and do not function.

What’s the right way to do this?

Thanks!

First of all, a 3rd party plugin with .jar and .so should be packed in appropriate way - ideally AAR, at least as an Android Library.

As for .so’s - add them wherever you want, select them, and in the Plugin inspector set platform to Android and the architecture to whatever needed. Should work.