Hi dev team
I have a question: there is so many mthods in cocos2dx3.* or 2.*, like:
Java_org_cocos2dx_lib_Cocos2dxWebViewHelper_shouldStartLoading
According to Android spec: https://developer.android.com/training/articles/perf-jni.html
This(Explicit registration) is the recommended approach, but not the only approach. Explicit registration is not required, nor is it necessary that you provide a JNI_OnLoad function. You can instead use "discovery" of native methods that are named in a specific way (see the JNI spec for details), though this is less desirable because if a method signature is wrong you won't know about it until the first time the method is actually used.
Isn’t it better to register these methods explicitly to JNI using RegisterNatives for at least these two reasons?
- the performance of VM to look for a method
- using the current way in 3.x, f a method signature is wrong you won’t know about it until the first time the method is actually used…
BR,
aichao