JNI folder in Android Studio

Nowadays there is an easier method than the accepted answer.

All you have to do is create a folder called “jniLibs” under your /src/main directory (ie, /app/src/main/jniLibs) and place your .so files there. It will look like this:

app
   |
   src
      |
     main
        |
        jniLibs
            |
            armeabi
            |   |
            |   your_lib_compiled_for_armeabi.so
            |
            armeabi-v7a
            |   |
            |   your_lib_compiled_for_v7a.so
            |
            x86
            |   |
            |   your_lib_compiled_for_x86.so

Your .so files should be picked up now.

Leave a Comment