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 build.gradle

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

    enter image description here