title: How do you add a native library (.so) to android studio?
body: <p>I am currently getting the following error:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: nativeLibraryDirectories=[/data/app/com.example.ryane.jzy-1/lib/arm, /vendor/lib, /system/lib] couldn't find "libgluegen-rt.so"
  </code></pre>
  
  <p>While performing the following line of code</p>
  
  <pre><code>System.loadLibrary("gluegen-rt");
  </code></pre>
  
  <p>I've included the following in my build.gradle</p>
  
  <pre><code>sourceSets {
      main {
          jniLibs.srcDirs = ["src/main/jniLibs", "$buildDir/native-libs"]
      }
  }
  </code></pre>
  
  <p>And have placed my libgluegen.so within src/main/jniLibs. According to the error it seems as if it isn't looking in the directory I specified. Are there steps that I'm missing?</p>