title: JNI GetMethodId return null
body: <p>I have a simple issue but can not find a solution on the net.</p>
  
  <p>I want simply to retrieve Java String from native using JNI.</p>
  
  <pre><code>jint JNI_OnLoad(JavaVM *vm, void *reserved) {
  void * my_lib_handle;
  
  jmethodID mid;
  jstring resultString;
  JNIEnv *env;
  int status;
  
  __android_log_write(ANDROID_LOG_DEBUG,"JNI", "&gt; JNI_OnLoad");
  status = (*vm)-&gt;GetEnv(vm, (void**)&amp;env, JNI_VERSION_1_4); 
  if(status &lt; 0){
      __android_log_write(ANDROID_LOG_DEBUG,"JNI", "failed to get JNI environment");
      status = (*vm)-&gt;AttachCurrentThread(vm, (void**)&amp;env, NULL);
      if(status &lt; 0){
          __android_log_write(ANDROID_LOG_DEBUG,"JNI", "failed to attach to current thread");
          return;
      }
  }
  jclass handlerClass = (*env)-&gt;FindClass(env, "com/mypackage/JniInterface");
  
  if (handlerClass == NULL) {
      __android_log_write(ANDROID_LOG_DEBUG,"JNI", "can not find the class JniInterface ");
      return;
  }
  mid = (*env)-&gt;GetMethodID(env, handlerClass, "getCert", "()Ljava/lang/String");
  if (mid == NULL) {
      __android_log_write(ANDROID_LOG_DEBUG,"JNI", "can not find the method getCert");
      return;
  }
  </code></pre>
  
  <p><code>FindClass</code> works. But it is failing in <code>GetMethodId</code>.</p>
  
  <p>Here is my simple class declaration. I made it simpler than previously :)</p>
  
  <pre><code>package com.mypackage;
  public class JniInterface {
  private static String cert;
  private static String key;
  public JniInterface(){
  
  }
  public static String getCert() {
      return cert;
  }
  public static void setCert(String cert) {
      JniInterface.cert = cert;
  }
  public static String getKey() {
      return key;
  }
  public static void setKey(String key) {
      JniInterface.key = key;
  }   
  }
  </code></pre>
  
  <p>I am stuck. I think it is a stupid error...</p>
  
  <p>Could you please help me to investigate it ?</p>