Search code examples
androidandroid-studiokotlinunity-game-engine

Failed to load 'libmain.so' java.lang.UnsatisfiedLinkError: dlopen failed: library "libmain.so" not found


I export my unity project as android and made the export as a aar library using android studio. And imported this library to my another android project, but when i try to start the UnityPlayerActivity i am getting this issue ->

Failed to load 'libmain.so' java.lang.UnsatisfiedLinkError: dlopen failed: library "libmain.so" not found


Solution

  • Found that I have to include this in my app's build.gradle file:

    ndk {
        abiFilters 'armeabi-v7a', 'x86'
    }