title: Android System.loadLibrary crashing
body: <p>I'm trying to include a <code>c file</code>, <code>ImageProc</code> into my java file to use it's functions.</p>
  
  <p>I got the code from a <code>MjpegInputStream file</code> (where everything is supposed to work, but of course its never that easy)</p>
  
  <p>Here is the code that crashes (somehow the catch isn't catching it)</p>
  
  <pre><code>static {
      try {
          System.loadLibrary("ImageProc");
      }
      catch (Exception e){
          e.getMessage();
      }
  }
  </code></pre>
  
  <p>The <code>makefile</code> is: </p>
  
  <pre><code>include $(CLEAR_VARS)
  LOCAL_MODULE    := ImageProc
  LOCAL_SRC_FILES := ImageProc.c
  LOCAL_LDLIBS    := -llog -ljnigraphics
  LOCAL_SHARED_LIBRARIES := prebuilt-libjpeg
  LOCAL_C_INCLUDES       := external/include jni/external/include
  </code></pre>
  
  <p>So to my understanding I should just be able to use <code>ImageProc</code>.</p>
  
  <p>I know it went through and compiled the <code>c file</code> because at first it couldn't find the h file references (fixed now).</p>
  
  <p>One other thing i'm not sure about is that I call the function <code>pixeltobmp</code> which in the c file is defined as <code>Java_com_camera_simplemjpeg_MjpegInputStream_pixeltobmp</code> which strikes me as odd. I tried changing the name of the method to include the package i'm using rather than the one I copied it from, but that didn't fix anything.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Additional info: I'm using gradle build 2.10</p>