Fix some JNI error in Android.