App crash in emulator 7.0: JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
<p>I got error android ndk on JniLibs code. I got error:</p>

<blockquote>
  <p>JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring</p>
</blockquote>

<p>The following are detail error. I cannot post all because it is too long.</p>

<pre><code>10-05 17:12:01.100 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
10-05 17:12:01.100 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]     in call to GetStringUTFChars
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]     from java.lang.String com.example.myapp.othercode.PassCodeUtil.genPassCode(android.content.Context)
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470] "main" prio=5 tid=1 Runnable
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]   | group="main" sCount=0 dsCount=0 obj=0x75518a50 self=0x7ffef3695a00
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]   | sysTid=3773 nice=0 cgrp=default sched=0/0 handle=0x7ffef7ff9b40
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]   | state=R schedstat=( 0 0 0 ) utm=3 stm=2 core=0 HZ=100
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]   | stack=0x7fffa7798000-0x7fffa779a000 stackSize=8MB
10-05 17:12:01.101 3773-3773/com.example.myapp A/art: art/runtime/java_vm_ext.cc:470]   | held mutexes= "mutator lock"(shared held)
.
.
.
</code></pre>

<p>JniLibs work well in emulator below this and show error in emulator version 7.0. The error occur when I remove app from recent apps and open the app again. Is it because of emulator or I did something wrong. I am very new with android ndk.</p>

<p>Thank for any helps.</p>