title: FindClass crashes in Android NDK
body: <p>I have a purely native Android app, where the entry point is:</p>
  
  <pre><code> void android_main(struct android_app* state) 
   {
   }
  </code></pre>
  
  <p>I need to access device information such as, android.os.Build.MODEL and in my android_main, have the following:</p>
  
  <pre><code>JNIEnv *env = state-&gt;activity-&gt;env;
      jclass build_class = env-&gt;FindClass("android/os/Build");
      jfieldID brand_id = env-&gt;GetStaticFieldID(build_class, "MODEL", "Ljava/lang/String;");
      jstring brand_obj = (jstring)env-&gt;GetStaticObjectField(build_class, brand_id);
  const char *nativeString = env-&gt;GetStringUTFChars(brand_obj, 0);
  </code></pre>
  
  <p>Unfortunately it crashes at the second line - "FindClass". I know that <code>env</code> is not null because I checked for this, but otherwise I am unable to debug this and find out why it is crashing :(</p>