title: Android JNI java.lang.UnsatisfiedLinkError
body: <p>I'm trying to implement the method rotateBitmapCcw90 found at <a href="https://stackoverflow.com/questions/14398670/rotating-a-bitmap-using-jni-ndk">another question</a>.
  In order to use this method, I've created a java class, named Utils. This class is as simple as:</p>
  
  <pre><code>package com.test.jnitest;
  
  import android.graphics.Bitmap;
  
  public class Utils {
      static {
          System.loadLibrary("utils");
      }
  
      public static native Bitmap rotateBitmapCcw90(Bitmap bitmap);
  }
  </code></pre>
  
  <p>rotateBitmapCcw90 is implemented inside <strong>com_test_jnitest_Utils.cpp</strong> under poject_path/jni. The content of this file is:</p>
  
  <pre><code>#include &lt;jni.h&gt;
  #include &lt;android/log.h&gt;
  #include &lt;android/bitmap.h&gt;
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #define  LOG_TAG    "libutils"
  #define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
  #define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
  #define  LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
  
  extern "C" {
  JNIEXPORT jobject JNICALL Java_com_test_jnitest_Utils_rotateBitmapCcw90(JNIEnv * env, jobject obj, jobject bitmap)
  {
      // same code of other question
      ...
  }
  };
  </code></pre>
  
  <p>My Android.mk is:</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  
  LOCAL_MODULE    := libutils
  LOCAL_SRC_FILES := com_test_jnitest_Utils.cpp
  LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
  LOCAL_LDLIBS += -ljnigraphics
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>Everything compiles successfully (ndk-build and Eclipse project), but as soon as I call Utils.rotateBitmapCcw90 passing a Bitmap, I get an java.lang.UnsatisfiedLinkError. The log says:</p>
  
  <pre><code>03-15 14:46:48.243: D/dalvikvm(1936): Trying to load lib /data/data/com.example.jnitest/lib/libutils.so 0x40f77c98
  03-15 14:46:48.253: D/dalvikvm(1936): Added shared lib /data/data/com.example.jnitest/lib/libutils.so 0x40f77c98
  03-15 14:46:48.253: D/dalvikvm(1936): No JNI_OnLoad found in /data/data/com.example.jnitest/lib/libutils.so 0x40f77c98, skipping init
  03-15 14:46:48.333: W/dalvikvm(1936): No implementation found for native Lcom/test/jnitest/Utils;.rotateBitmapCcw90:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
  </code></pre>
  
  <p>Quetion is: what am I doing wrong? Is there anything wrong with my cpp file? I have also already tried to generate a header with javah and including it on my cpp, but the same error appears.</p>