内置引擎是好的,自定义引擎报错了
static int jniRegisterNativeMethods(JNIEnv *env, const char *className,
const JNINativeMethod *methods,
int numMethods) {
ALOGV(“Registering %s’s %d native methods…”, className, numMethods);
jclass clazz = env->FindClass(className);
LOG_FATAL_IF(clazz == nullptr,
“Native registration unable to find class ‘%s’; aborting…”,
className);
int result = env->RegisterNatives(clazz, methods, numMethods);
env->DeleteLocalRef(clazz);
if (result == 0) {
return 0;
}
// Failure to register natives is fatal. Try to report the corresponding
// exception, otherwise abort with generic failure message.
jthrowable thrown = env->ExceptionOccurred();
if (thrown != NULL) {
env->ExceptionDescribe();
env->DeleteLocalRef(thrown);
}
LOG_FATAL("RegisterNatives failed for '%s'; aborting...", className);
}

