title: JNI error when trying to access the EXTRA_ADDRESS_BOOK_INDEX field
body: <p>I am trying to access the <a href="https://developer.android.com/reference/android/provider/ContactsContract.Data#extra_address_book_index" rel="noreferrer"><code>EXTRA_ADDRESS_BOOK_INDEX</code></a> constant using JNI:</p>
  
  <pre><code>JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
      JNIEnv* env = nullptr;
      vm-&gt;GetEnv(reinterpret_cast&lt;void**&gt;(&amp;env), JNI_VERSION_1_6);
      jclass clazz = env-&gt;FindClass("android/provider/ContactsContract$Data");
      jfieldID fieldID = env-&gt;GetStaticFieldID(clazz, "EXTRA_ADDRESS_BOOK_INDEX", "Ljava/lang/String;");
      jobject field = env-&gt;GetStaticObjectField(clazz, fieldID);
  }
  </code></pre>
  
  <p>The <code>GetStaticObjectField</code> method crashes with an error:</p>
  
  <blockquote>
    <p>java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: static jfieldID
    0x6fd191b0 not valid for class
    java.lang.Class&lt;android.provider.ContactsContract$Data&gt;</p>
  </blockquote>
  
  <p>On the other hand if I try to access the <a href="https://developer.android.com/reference/android/provider/ContactsContract.Data#visible_contacts_only" rel="noreferrer"><code>VISIBLE_CONTACTS_ONLY</code></a> field on the same class, everything works as expected:</p>
  
  <pre><code>jfieldID fieldID = env-&gt;GetStaticFieldID(clazz, "VISIBLE_CONTACTS_ONLY", "Ljava/lang/String;");
  </code></pre>
  
  <p>Any clues what I might be doing wrong?</p>